Get the current sequence numbers from all partitions.

@return an {@link Observable} of partition and sequence number.
7872
private Observable<PartitionAndSeqno> getSeqnos() {
    return conductor.getSeqnos().flatMap(new Func1<ByteBuf, Observable<PartitionAndSeqno>>() {
      @Override
      public Observable<PartitionAndSeqno> call(ByteBuf buf) {
        int numPairs = buf.readableBytes() / 10; // 2 byte short + 8 byte long
        List<PartitionAndSeqno> pairs = new ArrayList<>(numPairs);
        for (int i = 0; i < numPairs; i++) {
          pairs.add(new PartitionAndSeqno(buf.getShort(10 * i), buf.getLong(10 * i + 2)));
        }
        buf.release();
        return Observable.from(pairs);
      }
    });
  }
215165
public Observable<Page<PoolNodeCounts>> listPoolNodeCountsAsync() {
        return listPoolNodeCountsWithServiceResponseAsync()
            .map(new Func1<ServiceResponseWithHeaders<Page<PoolNodeCounts>, AccountListPoolNodeCountsHeaders>, Page<PoolNodeCounts>>() {
                @Override
                public Page<PoolNodeCounts> call(ServiceResponseWithHeaders<Page<PoolNodeCounts>, AccountListPoolNodeCountsHeaders> response) {
                    return response.body();
                }
            });
    }
8966
public java.util.List<Tape> getTapes() {
        if (tapes == null) {
            tapes = new com.amazonaws.internal.SdkInternalList<Tape>();
        }
        return tapes;
    }
81641
private Pair<Cluster, List<StoreDefinition>> getCurrentClusterState() {

        // Retrieve the latest cluster metadata from the existing nodes
        Versioned<Cluster> currentVersionedCluster = adminClient.rebalanceOps.getLatestCluster(Utils.nodeListToNodeIdList(Lists.newArrayList(adminClient.getAdminClientCluster()
                                                                                                                                                        .getNodes())));
        Cluster cluster = currentVersionedCluster.getValue();
        List<StoreDefinition> storeDefs = adminClient.rebalanceOps.getCurrentStoreDefinitions(cluster);
        return new Pair<Cluster, List<StoreDefinition>>(cluster, storeDefs);
    }
121613
public Observable<ServiceResponse<OperationsListResultsInner>> listWithServiceResponseAsync() {
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OperationsListResultsInner>>>() {
                @Override
                public Observable<ServiceResponse<OperationsListResultsInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<OperationsListResultsInner> clientResponse = listDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
867697
public Observable<List<Product>> getAllProducts() {
    return Observable.zip(getProducts(0), getProducts(1), getProducts(2), getProducts(3),
        (products0, products1, products2, products3) -> {
          List<Product> productList = new ArrayList<Product>();
          productList.addAll(products0);
          productList.addAll(products1);
          productList.addAll(products2);
          productList.addAll(products3);
          return productList;
        });
  }
829616
public Collection<FullColumnDescription> getPartitionKeyColumnDescriptions()
    {
        if (partitionKeys == null)
        {
            partitionKeys = new LinkedList<>();

            for (FullColumnDescription col : fullColumnDescriptions.values())
            {
                if (col.isPartitionKeyMember())
                {
                    this.partitionKeys.add(col);
                }
            }

            Collections.sort(this.partitionKeys, PartitionKeyComparator.INSTANCE);
        }

        return this.partitionKeys;
    }
416575
public Partition getAutomorphismPartition() {
        final int n = group.getSize();
        final DisjointSetForest forest = new DisjointSetForest(n);
        group.apply(new PermutationGroup.Backtracker() {

            boolean[]       inOrbit      = new boolean[n];
            private int     inOrbitCount = 0;
            private boolean isFinished;

            @Override
            public boolean isFinished() {
                return isFinished;
            }

            @Override
            public void applyTo(Permutation p) {
                for (int elementX = 0; elementX < n; elementX++) {
                    if (inOrbit[elementX]) {
                        continue;
                    } else {
                        int elementY = p.get(elementX);
                        while (elementY != elementX) {
                            if (!inOrbit[elementY]) {
                                inOrbitCount++;
                                inOrbit[elementY] = true;
                                forest.makeUnion(elementX, elementY);
                            }
                            elementY = p.get(elementY);
                        }
                    }
                }
                if (inOrbitCount == n) {
                    isFinished = true;
                }
            }
        });

        // convert to a partition
        Partition partition = new Partition();
        for (int[] set : forest.getSets()) {
            partition.addCell(set);
        }

        // necessary for comparison by string
        partition.order();
        return partition;
    }
456792
@SuppressWarnings("deprecation")
  public Counters getCounters() {
    synchronized (lockObject) {
      Counters result = new Counters();
      result.incrAllCounters(getJobCounters());

      incrementTaskCountersUnprotected(result, maps);
      return incrementTaskCountersUnprotected(result, reduces);
    }
  }
581246
public Observable<String> getLogs() {
        return aFile != null ? aFile.getLogs() : Observable.just(null);
    }
1025312
@Override
	public SequenceView<C> getSubSequence(Integer start, Integer end) {
		return new SequenceProxyView<C>(this, start, end);
	}
684550
public java.util.List<String> getStepStates() {
        if (stepStates == null) {
            stepStates = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return stepStates;
    }
881255
public Integer getPartition() {
        Object partition = getHeader(KafkaMessageHeaders.PARTITION);

        if (partition != null) {
            return TypeConversionUtils.convertIfNecessary(partition, Integer.class);
        }

        return null;
    }
33205
public Observable<Page<StorageAccountInner>> listAsync() {
        return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<StorageAccountInner>>, Page<StorageAccountInner>>() {
            @Override
            public Page<StorageAccountInner> call(ServiceResponse<List<StorageAccountInner>> response) {
                PageImpl<StorageAccountInner> page = new PageImpl<>();
                page.setItems(response.body());
                return page;
            }
        });
    }
701855
public int getNumObsFeats() {
        int count = 0;
        for (FactorTemplate ft : fts) {
            count += ft.getAlphabet().size();
        }
        return count;
    }
15471
@Override
    public Map<String, Optional<Partition>> getPartitionsByNames(String databaseName, String tableName, List<String> partitionNames)
    {
        requireNonNull(partitionNames, "partitionNames is null");
        if (partitionNames.isEmpty()) {
            return ImmutableMap.of();
        }

        List<Partition> partitions = batchGetPartition(databaseName, tableName, partitionNames);

        Map<String, List<String>> partitionNameToPartitionValuesMap = partitionNames.stream()
                .collect(toMap(identity(), HiveUtil::toPartitionValues));
        Map<List<String>, Partition> partitionValuesToPartitionMap = partitions.stream()
                .collect(toMap(Partition::getValues, identity()));

        ImmutableMap.Builder<String, Optional<Partition>> resultBuilder = ImmutableMap.builder();
        for (Entry<String, List<String>> entry : partitionNameToPartitionValuesMap.entrySet()) {
            Partition partition = partitionValuesToPartitionMap.get(entry.getValue());
            resultBuilder.put(entry.getKey(), Optional.ofNullable(partition));
        }
        return resultBuilder.build();
    }
343868
int getNumOccupiedMemorySegments() {
		// either the number of memory segments, or one for spilling
		final int numPartitionBuffers = this.partitionBuffers != null ?
				this.partitionBuffers.length
				: this.buildSideWriteBuffer.getNumOccupiedMemorySegments();
		return numPartitionBuffers + bucketArea.buckets.length + bucketArea.numOverflowSegments;
	}