Package org.json_voltpatches

Examples of org.json_voltpatches.JSONStringer.endArray()


            if (threw) {
                stringer = new JSONStringer();
                stringer.object();
                stringer.key("interfaces").array();
                stringer.value("localhost");
                stringer.endArray();
            } else {
                stringer.endArray();
            }
            stringer.key("clientPort").value(m_config.m_port);
            stringer.key("clientInterface").value(m_config.m_clientInterface);
View Full Code Here


                stringer.object();
                stringer.key("interfaces").array();
                stringer.value("localhost");
                stringer.endArray();
            } else {
                stringer.endArray();
            }
            stringer.key("clientPort").value(m_config.m_port);
            stringer.key("clientInterface").value(m_config.m_clientInterface);
            stringer.key("adminPort").value(m_config.m_adminPort);
            stringer.key("adminInterface").value(m_config.m_adminInterface);
View Full Code Here

                stringer.key("newPartitionCount").value(newPartitionCount);
                stringer.key("tables").array();
                for (int ii = 0; ii < tables.size(); ii++) {
                    stringer.value(tables.get(ii).getTypeName());
                }
                stringer.endArray();
                stringer.key("exportSequenceNumbers").array();
                for (Map.Entry<String, Map<Integer, Pair<Long, Long>>> entry : exportSequenceNumbers.entrySet()) {
                    stringer.object();

                    stringer.key("exportTableName").value(entry.getKey());
View Full Code Here

                        stringer.key("partition").value(sequenceNumber.getKey());
                        //First value is the ack offset which matters for pauseless rejoin, but not persistence
                        stringer.key("exportSequenceNumber").value(sequenceNumber.getValue().getSecond());
                        stringer.endObject();
                    }
                    stringer.endArray();

                    stringer.endObject();
                }
                stringer.endArray();
View Full Code Here

                    }
                    stringer.endArray();

                    stringer.endObject();
                }
                stringer.endArray();

                stringer.key("partitionTransactionIds").object();
                for (Map.Entry<Integer, Long> entry : partitionTransactionIds.entrySet()) {
                    stringer.key(entry.getKey().toString()).value(entry.getValue());
                }
View Full Code Here

                    else {
                        stringer.key("size").value(new File(path).length());
                    }
                    stringer.endObject();
                }
                stringer.endArray();
                stringer.endObject();

                JSONObject jsObj = new JSONObject(stringer.toString());
                jsonBytes = jsObj.toString(4).getBytes(Charsets.UTF_8);
            } catch (JSONException e) {
View Full Code Here

            stringer.key("action").value(m_action.ordinal());
            stringer.key("snapInfos").array();
            for (SnapshotInfo snapshot : snapshots) {
                stringer.value(snapshot.toJSONObject());
            }
            stringer.endArray();
            stringer.endObject();
            return stringer.toString();
        } catch (JSONException je) {
            VoltDB.crashLocalVoltDB("Error exchanging snapshot info", true, je);
        }
View Full Code Here

                    stringer.key("name").value(p.getKey());
                    stringer.key("partitions").array();
                    for (int pid : p.getValue()) {
                        stringer.value(pid);
                    }
                    stringer.endArray();
                    stringer.endObject();
                }
                stringer.endArray(); // tables
                stringer.key("partitionToTxnId").object();
                for (Entry<Integer,Long> e : partitionToTxnId.entrySet()) {
View Full Code Here

                        stringer.value(pid);
                    }
                    stringer.endArray();
                    stringer.endObject();
                }
                stringer.endArray(); // tables
                stringer.key("partitionToTxnId").object();
                for (Entry<Integer,Long> e : partitionToTxnId.entrySet()) {
                    stringer.key(e.getKey().toString()).value(e.getValue());
                }
                stringer.endObject(); // partitionToTxnId
View Full Code Here

                stringer.key("instanceId").value(instanceId.serializeToJSONObject());
                stringer.key("digestTables").array();
                for (String digestTable : digestTables) {
                    stringer.value(digestTable);
                }
                stringer.endArray();
                stringer.key("fileTables").array();
                for (String fileTable : fileTables) {
                    stringer.value(fileTable);
                }
                stringer.endArray();
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.