Package com.google.protobuf

Examples of com.google.protobuf.ByteString$ByteIterator


      uuidBuilder.setMostSigBits(clusterId.getMostSignificantBits());
      builder.addClusterIds(uuidBuilder.build());
    }
    if (scopes != null) {
      for (Map.Entry<byte[], Integer> e : scopes.entrySet()) {
        ByteString family = (compressionContext == null) ? HBaseZeroCopyByteString.wrap(e.getKey())
            : compressor.compress(e.getKey(), compressionContext.familyDict);
        builder.addScopes(FamilyScope.newBuilder()
            .setFamily(family).setScopeType(ScopeType.valueOf(e.getValue())));
      }
    }
View Full Code Here


    try {
      RollWALWriterResponse response = admin.rollWALWriter(null, request);
      int regionCount = response.getRegionToFlushCount();
      byte[][] regionsToFlush = new byte[regionCount][];
      for (int i = 0; i < regionCount; i++) {
        ByteString region = response.getRegionToFlush(i);
        regionsToFlush[i] = region.toByteArray();
      }
      return regionsToFlush;
    } catch (ServiceException se) {
      throw ProtobufUtil.getRemoteException(se);
    }
View Full Code Here

                                     boolean pruneTopic) {

        assert seqId != null;

        // remove this subscriber from the delivery pointers data structure
        ByteString topic = subscriber.getTopic();
        SortedMap<Long, Set<ActiveSubscriberState>> deliveryPtrs = perTopicDeliveryPtrs.get(topic);

        if (deliveryPtrs == null && !isAbsenceOk) {
            throw new UnexpectedError("No delivery pointers found while disconnecting " + "channel for topic:" + topic);
        }
View Full Code Here

     * ensure that the next readAheadCount messages are always available.
     *
     * @return the range scan that should be issued for read ahead
     */
    protected RangeScanRequest doReadAhead(ScanRequest request) {
        ByteString topic = request.getTopic();
        Long seqId = request.getStartSeqId();

        int readAheadCount = cfg.getReadAheadCount();
        // To prevent us from getting screwed by bad configuration
        readAheadCount = Math.max(1, readAheadCount);
View Full Code Here

            this.newSeqId = newSeqId;
        }

        @Override
        public void performRequest() {
            ByteString topic = subscriber.getTopic();
            long prevMinSeqId = getMinimumSeqId(topic);

            if (subscriber.isConnected()) {
                removeDeliveryPtr(subscriber, oldSeqId, //
                                  // isAbsenceOk=
View Full Code Here

     * 1) message bound doesn't take effects on 4.0.0 server.
     * 2) message bound take effects on both 4.1.0 and current server
     */
    @Test(timeout=60000)
    public void testMessageBoundCompat() throws Exception {
        ByteString topic = ByteString.copyFromUtf8("testMessageBoundCompat");
        ByteString subid = ByteString.copyFromUtf8("mysub");

        int port = PortManager.nextFreePort();
        int sslPort = PortManager.nextFreePort();

        // start bookkeeper 400
View Full Code Here

     * 2) current client could talk with 4.1.0 server,
     *    but no message seq id would be returned
     */
    @Test(timeout=60000)
    public void testPublishCompat410() throws Exception {
        ByteString topic = ByteString.copyFromUtf8("TestPublishCompat410");
        ByteString data = ByteString.copyFromUtf8("testdata");

        // start bookkeeper 410
        BookKeeperCluster410 bkc410 = new BookKeeperCluster410(3);
        bkc410.start();

View Full Code Here

     *
     * A current server could read subscription data recorded by 4.1.0 server.
     */
    @Test(timeout=60000)
    public void testSubscriptionDataCompat410() throws Exception {
        ByteString topic = ByteString.copyFromUtf8("TestCompat410");
        ByteString sub410 = ByteString.copyFromUtf8("sub410");
        ByteString subcur = ByteString.copyFromUtf8("subcur");

        // start bookkeeper 410
        BookKeeperCluster410 bkc410 = new BookKeeperCluster410(3);
        bkc410.start();

View Full Code Here

     *
     * A 4.1.0 client could not update message bound, while current could do it.
     */
    @Test(timeout=60000)
    public void testUpdateMessageBoundCompat410() throws Exception {
        ByteString topic = ByteString.copyFromUtf8("TestUpdateMessageBoundCompat410");
        ByteString subid = ByteString.copyFromUtf8("mysub");

        // start bookkeeper
        BookKeeperClusterCurrent bkccur= new BookKeeperClusterCurrent(3);
        bkccur.start();

View Full Code Here

     *
     * A current client running message filter would fail on 4.1.0 hub servers.
     */
    @Test(timeout=60000)
    public void testClientMessageFilterCompat410() throws Exception {
        ByteString topic = ByteString.copyFromUtf8("TestUpdateMessageBoundCompat410");
        ByteString subid = ByteString.copyFromUtf8("mysub");

        // start bookkeeper
        BookKeeperCluster410 bkc410 = new BookKeeperCluster410(3);
        bkc410.start();

View Full Code Here

TOP

Related Classes of com.google.protobuf.ByteString$ByteIterator

Copyright © 2018 www.massapicom. 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.