Package com.google.protobuf

Examples of com.google.protobuf.ByteString.toStringUtf8()


      if (entries == null || entries.isEmpty()) {
        // empty input
        return ReplicateWALEntryResponse.newBuilder().build();
      }
      ByteString regionName = entries.get(0).getKey().getEncodedRegionName();
      HRegion region = regionServer.getRegionByEncodedName(regionName.toStringUtf8());
      RegionCoprocessorHost coprocessorHost =
          ServerRegionReplicaUtil.isDefaultReplica(region.getRegionInfo())
            ? region.getCoprocessorHost()
            : null; // do not invoke coprocessors if this is a secondary region replica
      List<Pair<HLogKey, WALEdit>> walEntries = new ArrayList<Pair<HLogKey, WALEdit>>();
View Full Code Here


      Durability durability = isPrimary ? Durability.USE_DEFAULT : Durability.SKIP_WAL;

      for (WALEntry entry : entries) {
        if (!regionName.equals(entry.getKey().getEncodedRegionName())) {
          throw new NotServingRegionException("Replay request contains entries from multiple " +
              "regions. First region:" + regionName.toStringUtf8() + " , other region:"
              + entry.getKey().getEncodedRegionName());
        }
        if (regionServer.nonceManager != null) {
          long nonceGroup = entry.getKey().hasNonceGroup()
            ? entry.getKey().getNonceGroup() : HConstants.NO_NONCE;
View Full Code Here

    private void maybeShowReleaseNotes() {
        // Show release notes when we've upgraded to a new version (hard coded), but only if this is the first run
        // after the upgrade.
        ByteString bytes = Main.wallet.maybeGetTag(LAST_VER_TAG);
        if (bytes != null) {
            int lastVer = Integer.parseInt(bytes.toStringUtf8());
            if (Main.VERSION > lastVer) {
                log.info("Was upgraded from v{} to v{}!", lastVer, Main.VERSION);

                //
                // No release notes currently.
View Full Code Here

        System.out.println(response.getErrorCode());
        System.out.println(response.getFileSize());
        ByteString content = response.getContent();
        System.out.println(content.size());
        if (content.size() < 8192) {
            System.out.println(content.toStringUtf8());
        }
    }

    public void runCommand(String cmd, String... args) throws Exception {
        RunCommandRequest request = RunCommandRequest.newBuilder()
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.