Package org.json_voltpatches

Examples of org.json_voltpatches.JSONObject.keys()


            Map<String, Map<Integer, Pair<Long, Long>>> exportSequenceNumbers = null;
            final JSONObject exportSequenceJSON = jsonObj.getJSONObject("exportSequenceNumbers");
            final ImmutableMap.Builder<String, Map<Integer, Pair<Long, Long>>> builder =
                    ImmutableMap.builder();
            @SuppressWarnings("unchecked")
            final Iterator<String> tableKeys = exportSequenceJSON.keys();
            while (tableKeys.hasNext()) {
                final String tableName = tableKeys.next();
                final JSONObject tableSequenceNumbers = exportSequenceJSON.getJSONObject(tableName);
                ImmutableMap.Builder<Integer, Pair<Long, Long>> tableBuilder = ImmutableMap.builder();
                @SuppressWarnings("unchecked")
View Full Code Here


            while (tableKeys.hasNext()) {
                final String tableName = tableKeys.next();
                final JSONObject tableSequenceNumbers = exportSequenceJSON.getJSONObject(tableName);
                ImmutableMap.Builder<Integer, Pair<Long, Long>> tableBuilder = ImmutableMap.builder();
                @SuppressWarnings("unchecked")
                final Iterator<String> partitionKeys = tableSequenceNumbers.keys();
                while (partitionKeys.hasNext()) {
                    final String partitionString = partitionKeys.next();
                    final Integer partitionId = Integer.valueOf(partitionString);
                    JSONObject sequenceNumbers = tableSequenceNumbers.getJSONObject(partitionString);
                    final Long ackOffset = sequenceNumbers.getLong("ackOffset");
View Full Code Here

        if (jsData != null) {
            try {
                JSONObject sp = jsData.getJSONObject("streamPairs");
                @SuppressWarnings("unchecked")
                Iterator<String> it = sp.keys();
                while (it.hasNext()) {
                    String key = it.next();
                    long sourceHSId = Long.valueOf(key);
                    JSONArray destJSONArray = sp.getJSONArray(key);
                    for (int i = 0; i < destJSONArray.length(); i++) {
View Full Code Here

            catalog_crc = digest_detail.getLong("catalogCRC");

            if (digest_detail.has("partitionTransactionIds")) {
                JSONObject pidToTxnId = digest_detail.getJSONObject("partitionTransactionIds");
                @SuppressWarnings("unchecked")
                Iterator<String> it = pidToTxnId.keys();
                while (it.hasNext()) {
                    String pidkey = it.next();
                    Long txnidval = pidToTxnId.getLong(pidkey);
                    pidToTxnMap.put(Integer.valueOf(pidkey), txnidval);
                }
View Full Code Here

                }
                partitions.put(name, partSet);
            }
            JSONObject jsonPtoTxnId = jo.getJSONObject("partitionToTxnId");
            @SuppressWarnings("unchecked")
            Iterator<String> it = jsonPtoTxnId.keys();
            while (it.hasNext()) {
                 String key = it.next();
                 Long val = jsonPtoTxnId.getLong(key);
                 partitionToTxnId.put(Integer.valueOf(key), val);
            }
View Full Code Here

    private Collection<PartitionRanges> parsePartitionRanges(JSONObject jsData)
    {
        if (jsData != null) {
            try {
                JSONObject partitionObj = jsData.getJSONObject("partitionRanges");
                Iterator partitionKey = partitionObj.keys();

                ImmutableList.Builder<PartitionRanges> partitionRangesBuilder =
                    ImmutableList.builder();

                while (partitionKey.hasNext()) {
View Full Code Here

                    ImmutableList.builder();

                while (partitionKey.hasNext()) {
                    String pidStr = (String) partitionKey.next();
                    JSONObject rangeObj = partitionObj.getJSONObject(pidStr);
                    Iterator rangeKey = rangeObj.keys();

                    ImmutableSortedMap.Builder<Integer, Integer> rangeBuilder =
                        ImmutableSortedMap.naturalOrder();
                    while (rangeKey.hasNext()) {
                        String rangeStartStr = (String) rangeKey.next();
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.