public static String getNextStep(Result cdata) { CommandResult cResult = (CommandResult) cdata; if (ResultData.TYPE_COMPOSITE.equals(cResult.getType())) { CompositeResultData rd = (CompositeResultData) cResult.getResultData(); SectionResultData section = rd.retrieveSection(CLIMultiStepHelper.STEP_SECTION); String nextStep = (String) section.retrieveObject(CLIMultiStepHelper.NEXT_STEP_NAME); return nextStep; } else { if (ResultData.TYPE_ERROR.equals(cResult.getType())) { throw new CLIStepExecption(cResult); } else { throw new RuntimeException("Step returned result of type other than " + ResultData.TYPE_COMPOSITE + " Type " + cResult.getType()); } } }
public SectionResultData retrieveSectionByIndex(int index) { SectionResultData sectionToRetrieve = null; int i = 0; for (Iterator<String> iterator = sectionGfJsonObject.keys(); iterator.hasNext();) { String key = iterator.next(); if (key.startsWith(CompositeResultData.SECTION_DATA_ACCESSOR)) { if (i == index) { sectionToRetrieve = new SectionResultData(sectionGfJsonObject.getJSONObject(key)); break; } i++; } } return sectionToRetrieve; }
String memberId = entry.getKey().getId(); section = compositeResultData.addSection(memberId); section.addData("On Member", memberId); SectionResultData subSection = section.addSection("DiskStore"+memberId); subSection.addData("UUID", persistentID.getUUID()); subSection.addData("Host", persistentID.getHost().getHostName()); subSection.addData("Directory", persistentID.getDirectory());
regionSection.addSeparator('-'); regionSection.addData("Name", regionDescription.getName()); regionSection.addData("Data Policy", dataPolicy); memberType = CliStrings.DESCRIBE_REGION__HOSTING__MEMBER; regionSection.addData(memberType, CliUtil.convertStringSetToString(regionDescription.getHostingMembers(), '\n')); regionSection.addSeparator('.'); TabularResultData commonNonDefaultAttrTable = regionSection.addSection().addTable(); Set<String> members = regDescPerMemberMap.keySet(); TabularResultData table = regionSection.addSection().addTable();
CompositeResultData crd = ResultBuilder.createCompositeResultData(); SectionResultData section = crd.addSection(); TabularResultData metricsTable = section.addTable(); metricsTable.setHeader("Cluster-wide Region Metrics"); StringBuilder csvBuilder = null;
section.addData("Message", errorString); section.addData(RESULT_FLAG, operationCompletedSuccessfully); return ResultBuilder.buildResult(data); CompositeResultData data = ResultBuilder.createCompositeResultData(); SectionResultData section = data.addSection(); TabularResultData table = section.addTable(); section.addData(RESULT_FLAG, operationCompletedSuccessfully); if(infoString!=null) section.addData("Message", infoString); section.addData("Key Class", getKeyClass()); if(!isDeclaredPrimitive(keyClass)) addJSONStringToTable(table,inputKey); else section.addData("Key", inputKey); section.addData("Value Class", getValueClass()); if(!isDeclaredPrimitive(valueClass)) addJSONStringToTable(table,getResult); else section.addData("Value", getResult); section.addData("Key Class", getKeyClass()); if(!isDeclaredPrimitive(keyClass)) addJSONStringToTable(table,inputKey); else section.addData("Key", inputKey);
regionSection.addSeparator('-'); regionSection.addData("Name", regionDescription.getName()); regionSection.addData("Data Policy", dataPolicy); memberType = CliStrings.DESCRIBE_REGION__HOSTING__MEMBER; regionSection.addData(memberType, CliUtil.convertStringSetToString(regionDescription.getHostingMembers(), '\n')); regionSection.addSeparator('.'); TabularResultData commonNonDefaultAttrTable = regionSection.addSection().addTable(); Set<String> members = regDescPerMemberMap.keySet(); TabularResultData table = regionSection.addSection().addTable();
&& ((PartitionRebalanceInfo) iterator.next()).getRegionPath().length() > 0) { final TabularResultData resultData = rebalanceResulteData.addSection() .addTable("Table" + index); String newLine = System.getProperty("line.separator"); StringBuilder resultStr = new StringBuilder();
&& ((PartitionRebalanceInfo) iterator.next()).getRegionPath().length() > 0) { final TabularResultData resultData = rebalanceResulteData.addSection() .addTable("Table" + index); String newLine = System.getProperty("line.separator"); StringBuilder resultStr = new StringBuilder();
CompositeResultData crd = ResultBuilder.createCompositeResultData(); SectionResultData section = crd.addSection(); TabularResultData metricsTable = section.addTable(); metricsTable.setHeader("Metrics for region:" + regionName+ " On Member " + MBeanJMXAdapter.getMemberNameOrId(distributedMember)); StringBuilder csvBuilder = null;
CompositeResultData crd = ResultBuilder.createCompositeResultData(); SectionResultData section = crd.addSection(); TabularResultData metricsTable = section.addTable(); metricsTable.setHeader("Metrics for region:" + regionName+ " On Member " + MBeanJMXAdapter.getMemberNameOrId(distributedMember)); StringBuilder csvBuilder = null;
TabularResultData resultTable = section.addTable("ChangeLogLevel"); resultTable = resultTable.setHeader("Summary");
List<CliFunctionResult> results = CliFunctionResult.cleanResults((List<?>) rc.getResult()); CompositeResultData crd = ResultBuilder.createCompositeResultData(); TabularResultData tabularData = crd.addSection().addTable(); Set<String> successfulMembers = new TreeSet<String>(); Set<String> errorMessages = new TreeSet<String>();
TabularResultData metricsTable = section.addTable(); Map<String, Boolean> categoriesMap = getSystemMetricsCategories();
&& rstlist.get(resultItemCount) != null && rstlist.get(resultItemCount).length() > 0) { TabularResultData table1 = rebalanceResulteData.addSection().addTable( "Table" + index); String newLine = System.getProperty("line.separator");
&& rstlist.get(resultItemCount) != null && rstlist.get(resultItemCount).length() > 0) { TabularResultData table1 = rebalanceResulteData.addSection().addTable( "Table" + index); String newLine = System.getProperty("line.separator");
TabularResultData metricsTable = section.addTable(); Map<String, Boolean> categoriesMap = getSystemMetricsCategories();
String memberId = entry.getKey().getId(); section = compositeResultData.addSection(memberId); section.addData("On Member", memberId); SectionResultData subSection = section.addSection("DiskStore"+memberId); subSection.addData("UUID", persistentID.getUUID()); subSection.addData("Host", persistentID.getHost().getHostName()); subSection.addData("Directory", persistentID.getDirectory());
TabularResultData jvmInputArgs = crd.addSection().addSection().addTable(); cacheServerSection.setHeader("Cache-server attributes");
backedupDiskStoresSection.setHeader(CliStrings.BACKUP_DISK_STORE_MSG_BACKED_UP_DISK_STORES); TabularResultData backedupDiskStoresTable = backedupDiskStoresSection.addTable(); noMembersBackedUp.setHeader(CliStrings.BACKUP_DISK_STORE_MSG_NO_DISKSTORES_BACKED_UP); TabularResultData offlineDiskStoresTable = offlineDiskStoresSection.addTable(); offlineDiskStoresSection.setHeader(CliStrings.BACKUP_DISK_STORE_MSG_OFFLINE_DISK_STORES); for (PersistentID offlineDiskStore : offlineDiskStores) { offlineDiskStoresTable.accumulate(CliStrings.BACKUP_DISK_STORE_MSG_UUID, offlineDiskStore.getUUID().toString());