Examples of BatchStatus


Examples of com.alibaba.jstorm.batch.util.BatchStatus

    collector.ack(tuple);
  }

  public void execute(Tuple tuple) {

    BatchStatus batchStatus = getBatchStatus(tuple);

    if (batchStatus == BatchStatus.COMPUTING) {
      handleRegular(tuple);
    } else if (batchStatus == BatchStatus.PREPARE_COMMIT) {
      handlePrepareCommit(tuple);
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

    boolean isSuccess = true;
    for (CalendarEventEntry entry : batchResponse.getEntries()) {
      String batchId = BatchUtils.getBatchId(entry);
      if (!BatchUtils.isSuccess(entry)) {
        isSuccess = false;
        BatchStatus status = BatchUtils.getBatchStatus(entry);
        log.warning("\n" + batchId + " failed (" + status.getReason() + ") " + status.getContent());
      }
    }
    if (isSuccess) {
      log.info("Successfully executed all events via batch request.");
    }
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

      boolean isSuccess = true;
      for (CellEntry entry : batchResponse.getEntries()) {
        String batchId = BatchUtils.getBatchId(entry);
        if (!BatchUtils.isSuccess(entry)) {
          isSuccess = false;
          BatchStatus status = BatchUtils.getBatchStatus(entry);
          log.warning("\n" + batchId + " failed (" + status.getReason() + ") " + status.getContent());
        }
      }
      if (isSuccess) {
        log.info("Successfully executed all events via batch request.");
      }
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

                    CellFeed batchResponse = service.batch(new URL(batchLink.getHref()), batchRequest);
                   
                    for (CellEntry entry : batchResponse.getEntries()) {
                      String batchId = BatchUtils.getBatchId(entry);
                      if (!BatchUtils.isSuccess(entry)) {
                        BatchStatus status = BatchUtils.getBatchStatus(entry);
                        logger.warn(
                            String.format(
                                "Error: %s failed (%s) %s\n",
                                batchId, status.getReason(), status.getContent()));
                        break;
                      }
                    }
                } catch (Exception e) {
                    e.printStackTrace();
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

            .getName();
        System.out.println("The " + operation + " worked!");
      } else {
        System.out.println("Operation " + BatchUtils.getBatchId(entry)
            + "failed!");
        BatchStatus status = BatchUtils.getBatchStatus(entry);
        System.out.println(status.getCode() + " - "
            + status.getContent());
      }
    }
  }
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

    boolean isSuccess = true;
    for (CalendarEventEntry entry : batchResponse.getEntries()) {
      String batchId = BatchUtils.getBatchId(entry);
      if (!BatchUtils.isSuccess(entry)) {
        isSuccess = false;
        BatchStatus status = BatchUtils.getBatchStatus(entry);
        System.out.println("\n" + batchId + " failed (" + status.getReason()
            + ") " + status.getContent());
      }
    }
    if (isSuccess) {
      System.out.println("Successfully deleted all events via batch request.");
    }
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

      BatchResult result = manager.unshareProfiles();

      System.out.println("Success: " + result.getSuccess() + " - Error: " + result.getError());
      for (ContactEntry entry : result.getErrorEntries()) {
        BatchStatus status = BatchUtils.getBatchStatus(entry);

        System.out.println(" > Failed to update " + entry.getId() + ": (" + status.getCode() + ") "
            + status.getReason());
      }
    }
  }
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

            myService.batch(new URL("https://www.google.com/m8/feeds/profiles/domain/"
                + this.domain + "/full/batch?xoauth_requestor_id=" + this.adminEmail), requestFeed);

        // Check the status of each operation.
        for (ContactEntry entry : responseFeed.getEntries()) {
          BatchStatus batchStatus = BatchUtils.getBatchStatus(entry);

          if (batchStatus.getCode() == 200) {
            result.setSuccess(result.getSuccess() + 1);
          } else {
            result.setError(result.getError() + 1);
            result.addErrorEntry(entry);
          }
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

      // Check for failure in the returned entries.
      int failedInsertions = 0, successfulInsertions = 0;
      for (MailItemEntry returnedEntry : feed.getEntries()) {
        if (BatchUtils.isFailure(returnedEntry)) {
          BatchStatus status = BatchUtils.getBatchStatus(returnedEntry);
          LOGGER.log(Level.SEVERE, "Entry "
              + BatchUtils.getBatchId(returnedEntry) + " failed insertion: "
              + status.getCode() + " " + status.getReason());
          failedInsertions++;
        } else {
          successfulInsertions++;
        }
      }
View Full Code Here

Examples of com.google.gdata.data.batch.BatchStatus

      // Check for failure in the returned entries.
      int failedInsertions = 0, successfulInsertions = 0;
      for (GenericEntry returnedEntry : resultFeed.getEntries()) {
        if (BatchUtils.isFailure(returnedEntry)) {
          BatchStatus status = BatchUtils.getBatchStatus(returnedEntry);
          LOGGER.log(Level.SEVERE, "Entry "
              + BatchUtils.getBatchId(returnedEntry) + " failed insertion: "
              + status.getCode() + " " + status.getReason());
          failedInsertions++;
        } else {
          successfulInsertions++;
        }
      }
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.