Examples of DeployResult


Examples of com.sforce.soap.metadata.DeployResult

    public String checkDeploy(@PathVariable("asyncId") String asyncId) throws Exception
    {
      // Connect to Metadata API, check async status and return to client
        ForceServiceConnector connector = new ForceServiceConnector(ForceServiceConnector.getThreadLocalConnectorConfig());
        MetadataConnection metadataConnection = connector.getMetadataConnection();
        DeployResult deployResult = metadataConnection.checkDeployStatus(asyncId);
    ObjectMapper objectMapper = new ObjectMapper();
    return objectMapper.writeValueAsString(printErrors(deployResult));
    }
View Full Code Here

Examples of com.sforce.soap.metadata.DeployResult

            return result;
        }
       
        @Mock
        public DeployResult checkDeployStatus(String processId) {
            DeployResult result = new DeployResult();
            result.setSuccess(true);
            return result;
        }
View Full Code Here

Examples of com.sforce.soap.metadata.DeployResult

        AsyncResult asyncResult = metadatabinding.deploy(readZipFile(DEPLOY_ZIP), deployOptions);

        // Wait for the deploy to complete 
        waitForAsyncResult(metadatabinding, new AsyncResult[] {asyncResult}, true, DEPLOY_ZIP);

        DeployResult result = metadatabinding.checkDeployStatus(asyncResult.getId());
       
        // Log any messages 
        StringBuilder buf = new StringBuilder();
        if (result.getMessages() != null) {
            for (DeployMessage rm : result.getMessages()) {
                if (rm.getProblem() != null) {
                    buf.append("Error deploying: " + rm.getFileName() + " - " + rm.getProblem() + " \n ");
                }
            }
        }
View Full Code Here

Examples of com.sforce.soap.metadata.DeployResult

    public DeployResult checkDeployStatus(String asyncProcessId) throws ForceRemoteException {
        if (metadataConnection == null) {
            throw new IllegalArgumentException("Metadata stub cannot be null");
        }

        DeployResult deployResult = null;
        try {
            deployResult = metadataConnection.checkDeployStatus(asyncProcessId, true);
        } catch (ConnectionException e) {
            ForceExceptionUtils.throwTranslatedException(e, connection);
        }
View Full Code Here

Examples of com.sforce.soap.metadata.DeployResult

            ServiceException, ForceRemoteException, ForceRemoteException, InterruptedException {
        if (metadataStubExt == null) {
            throw new IllegalArgumentException("MetadataStubExt cannot be null");
        }

        DeployResult deployResult;
        try {
            IFileBasedResultAdapter result =
                    waitForResult(new DeployResultAdapter(asyncResult, metadataStubExt), metadataStubExt,
                        operationStats, monitor);
            deployResult = ((DeployResultAdapter) result).getDeployResult();
View Full Code Here

Examples of net.sf.katta.operation.node.DeployResult

      }
    } else {
      IndexDeployError deployError = new IndexDeployError(indexMD.getName(), ErrorType.SHARDS_NOT_DEPLOYABLE);
      for (OperationResult operationResult : results) {
        if (operationResult != null) {// node-crashed produces null
          DeployResult deployResult = (DeployResult) operationResult;
          for (Entry<String, Exception> entry : deployResult.getShardExceptions().entrySet()) {
            deployError.addShardError(entry.getKey(), entry.getValue());
          }
        }
      }
      indexMD.setDeployError(deployError);
View Full Code Here

Examples of net.sf.katta.operation.node.DeployResult

  }

  private void updateShardMetaData(List<OperationResult> results, IndexMetaData indexMD) {
    for (OperationResult operationResult : results) {
      if (operationResult != null) {// node-crashed produces null
        DeployResult deployResult = (DeployResult) operationResult;
        for (Entry<String, Map<String, String>> entry : deployResult.getShardMetaDataMaps().entrySet()) {
          Map<String, String> existingMap = indexMD.getShard(entry.getKey()).getMetaDataMap();
          Map<String, String> newMap = entry.getValue();
          if (existingMap.size() > 0 && !existingMap.equals(newMap)) {
            // maps from different nodes but for the same shard should have
            // the same content
View Full Code Here

Examples of net.sf.katta.operation.node.DeployResult

    // now complete the deployment
    List<OperationResult> results = new ArrayList<OperationResult>();
    for (NodeQueue nodeQueue : nodeQueues) {
      NodeOperation nodeOperation = nodeQueue.peek();
      DeployResult deployResult = new DeployResult(_indexName);
      Set<String> nodeShards = ((ShardDeployOperation) nodeOperation).getShardNames();
      for (String shardName : nodeShards) {
        deployResult.addShardException(shardName, new Exception());
      }
      results.add(deployResult);
    }

    operation.nodeOperationsComplete(_context, results);
View Full Code Here

Examples of net.sf.katta.operation.node.DeployResult

    IndexDeployOperation operation = new IndexDeployOperation(_indexName, _indexPath, 3);
    operation.execute(_context, EMPTY_LIST);
    publisShards(nodes, queues);

    ArrayList<OperationResult> results = new ArrayList<OperationResult>();
    DeployResult deployResult1 = new DeployResult(nodes.get(0).getName());
    DeployResult deployResult2 = new DeployResult(nodes.get(1).getName());
    DeployResult deployResult3 = new DeployResult(nodes.get(2).getName());
    Map<String, String> metaMap = new HashMap<String, String>();
    metaMap.put("a", "1");
    String shard1Name = AbstractIndexOperation.createShardName(_indexName, _indexFile.listFiles()[0].getAbsolutePath());
    deployResult1.addShardMetaDataMap(shard1Name, metaMap);
    deployResult2.addShardMetaDataMap(shard1Name, metaMap);
    deployResult3.addShardMetaDataMap(shard1Name, metaMap);
    results.add(deployResult1);
    results.add(deployResult2);
    results.add(deployResult3);

    operation.nodeOperationsComplete(_context, results);
View Full Code Here

Examples of net.sf.katta.operation.node.DeployResult

    IndexDeployOperation operation = new IndexDeployOperation(_indexName, _indexPath, 3);
    operation.execute(_context, EMPTY_LIST);
    publisShards(nodes, queues);

    ArrayList<OperationResult> results = new ArrayList<OperationResult>();
    DeployResult deployResult1 = new DeployResult(nodes.get(0).getName());
    DeployResult deployResult2 = null;
    DeployResult deployResult3 = new DeployResult(nodes.get(2).getName());
    Map<String, String> metaMap = new HashMap<String, String>();
    metaMap.put("a", "1");
    String shard1Name = AbstractIndexOperation.createShardName(_indexName, _indexFile.listFiles()[0].getAbsolutePath());
    deployResult1.addShardMetaDataMap(shard1Name, metaMap);
    deployResult3.addShardMetaDataMap(shard1Name, metaMap);
    results.add(deployResult1);
    results.add(deployResult2);
    results.add(deployResult3);

    operation.nodeOperationsComplete(_context, results);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.