Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.KeyRange$KeyRangeStandardSchemeFactory


                                                                  final int rowLimit) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<Column>>>() {
            public Map<ByteBuffer, List<Column>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                SlicePredicate predicate = ALL_COLUMNS;
                KeyRange keyRange = new KeyRange(rowLimit);
                keyRange.setStart_key(bytes(startKey));
                keyRange.setEnd_key(bytes(""));
                return keyspace.getRangeSlices(columnParent, predicate, keyRange);
            }
        });
    }
View Full Code Here


        List<InputSplit> splits = new ArrayList<InputSplit>();

        try
        {
            List<Future<List<InputSplit>>> splitfutures = new ArrayList<Future<List<InputSplit>>>();
            KeyRange jobKeyRange = ConfigHelper.getInputKeyRange(conf);
            Range<Token> jobRange = null;
            if (jobKeyRange != null)
            {
                if (jobKeyRange.start_key == null)
                {
View Full Code Here

      String startKey = "";

      // Get the keys in SLICE_SIZE blocks
      int sliceSize = Math.min(SLICE_SIZE, numEntries);
      for(boolean complete = false; !complete; ) {
        KeyRange keyRange = new KeyRange(sliceSize);
        keyRange.setStart_token(startKey);
        keyRange.setEnd_token("");
        List<KeySlice> keySlices = cassandraClient.get_range_slices(config.keySpace, entryColumnParent, slicePredicate, keyRange, readConsistencyLevel);       

        // Cycle through all the keys
        for (KeySlice keySlice : keySlices) {
          String key = unhashKey(keySlice.getKey());
View Full Code Here

      slicePredicate.setSlice_range(new SliceRange(entryColumnPath.getColumn(), emptyByteArray, false, 1));
      String startKey = "";
      boolean complete = false;
      // Get the keys in SLICE_SIZE blocks
      while (!complete) {
        KeyRange keyRange = new KeyRange(SLICE_SIZE);
        keyRange.setStart_token(startKey);
        keyRange.setEnd_token("");
        List<KeySlice> keySlices = cassandraClient.get_range_slices(config.keySpace, entryColumnParent, slicePredicate, keyRange, readConsistencyLevel);
        if (keySlices.size() < SLICE_SIZE) {
          complete = true;
        } else {
          startKey = keySlices.get(keySlices.size() - 1).getKey();
View Full Code Here

      slicePredicate.setSlice_range(new SliceRange(entryColumnPath.getColumn(), emptyByteArray, false, 1));
      String startKey = "";
      boolean complete = false;
      // Get the keys in SLICE_SIZE blocks
      while (!complete) {
        KeyRange keyRange = new KeyRange(SLICE_SIZE);
        keyRange.setStart_token(startKey);
        keyRange.setEnd_token("");
        List<KeySlice> keySlices = cassandraClient.get_range_slices(config.keySpace, entryColumnParent, slicePredicate, keyRange, readConsistencyLevel);
        if (keySlices.size() < SLICE_SIZE) {
          complete = true;
        } else {
          startKey = keySlices.get(keySlices.size() - 1).getKey();
View Full Code Here

                                                                            final int rowLimit) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<SuperColumn>>>() {
            public Map<ByteBuffer, List<SuperColumn>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                SlicePredicate predicate = ALL_COLUMNS;
                KeyRange keyRange = new KeyRange(rowLimit);
                keyRange.setStart_key(bytes(startKey));
                keyRange.setEnd_key(bytes(""));
                return keyspace.getSuperRangeSlices(columnParent, predicate, keyRange);
            }
        });
    }
View Full Code Here

                                                                  final int rowLimit) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<Column>>>() {
            public Map<ByteBuffer, List<Column>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                SlicePredicate predicate = ALL_COLUMNS;
                KeyRange keyRange = new KeyRange(rowLimit);
                keyRange.setStart_key(bytes(startKey));
                keyRange.setEnd_key(bytes(""));
                return keyspace.getRangeSlices(columnParent, predicate, keyRange);
            }
        });
    }
View Full Code Here

                                                                            final int rowLimit) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<SuperColumn>>>() {
            public Map<ByteBuffer, List<SuperColumn>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                SlicePredicate predicate = ALL_COLUMNS;
                KeyRange keyRange = new KeyRange(rowLimit);
                keyRange.setStart_key(bytes(startKey));
                keyRange.setEnd_key(bytes(""));
                return keyspace.getSuperRangeSlices(columnParent, predicate, keyRange);
            }
        });
    }
View Full Code Here

                                                                  final int rowLimit) {
        return template.read(keyspaceName, new KeyspaceCallback<Map<ByteBuffer, List<Column>>>() {
            public Map<ByteBuffer, List<Column>> execute(KeyspaceService keyspace) {
                ColumnParent columnParent = new ColumnParent(columnFamilyName);
                SlicePredicate predicate = ALL_COLUMNS;
                KeyRange keyRange = new KeyRange(rowLimit);
                keyRange.setStart_key(bytes(startKey));
                keyRange.setEnd_key(bytes(""));
                return keyspace.getRangeSlices(columnParent, predicate, keyRange);
            }
        });
    }
View Full Code Here

        List<InputSplit> splits = new ArrayList<InputSplit>();

        try
        {
            List<Future<List<InputSplit>>> splitfutures = new ArrayList<Future<List<InputSplit>>>();
            KeyRange jobKeyRange = ConfigHelper.getInputKeyRange(conf);
            Range<Token> jobRange = null;
            if (jobKeyRange != null)
            {
                if (jobKeyRange.start_key != null)
                {
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.KeyRange$KeyRangeStandardSchemeFactory

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.