/** * Gets the list of all active compactions. * * @return compaction info list */ public List<CompactionInfo> getCompactions() { List<CompactionInfo> compactions = new ArrayList<>(); for (Map<String, String> compaction : this.nodeProbe.getCompactionManagerProxy().getCompactions()) { compactions.add(new CompactionInfo(Long.parseLong(compaction.get("total")), Long.parseLong(compaction.get("completed")), compaction.get("unit"), compaction.get("taskType"), compaction.get("keyspace"), compaction.get("columnfamily"), compaction.get("compactionId"))); } return compactions; }
/** * Gets the list of all active compactions. * * @return compaction info list */ public List<CompactionInfo> getCompactions() { List<CompactionInfo> compactions = new ArrayList<>(); for (Map<String, String> compaction : this.nodeProbe.getCompactionManagerProxy().getCompactions()) { compactions.add(new CompactionInfo(Long.parseLong(compaction.get("total")), Long.parseLong(compaction.get("completed")), compaction.get("unit"), compaction.get("taskType"), compaction.get("keyspace"), compaction.get("columnfamily"), null)); } return compactions; }
/** * Gets the list of all active compactions. * * @return compaction info list */ public List<CompactionInfo> getCompactions() { List<CompactionInfo> compactions = new ArrayList<>(); for (Map<String, String> compaction : this.nodeProbe.getCompactionManagerProxy().getCompactions()) { compactions.add(new CompactionInfo(Long.parseLong(compaction.get("total")), Long.parseLong(compaction.get("completed")), compaction.get("unit"), compaction.get("taskType"), compaction.get("keyspace"), compaction.get("columnfamily"), null)); } return compactions; }
/** * Gets the list of all active compactions. * * @return compaction info list */ public List<CompactionInfo> getCompactions() { List<CompactionInfo> compactions = new ArrayList<>(); for (Map<String, String> compaction : this.nodeProbe.getCompactionManagerProxy().getCompactions()) { compactions.add(new CompactionInfo(Long.parseLong(compaction.get("total")), Long.parseLong(compaction.get("completed")), compaction.get("unit"), compaction.get("taskType"), compaction.get("keyspace"), compaction.get("columnfamily"), compaction.get("compactionId"))); } return compactions; }
/** * Get compaction settings info for. * * @return compaction settings info. */ @Override public CompactionSettingsInfo getCompactionSettingsInfo() { return new CompactionSettingsInfo(nodeProbe.getCompactionThroughput(), nodeProbe.getCompactionManagerProxy().getCoreCompactorThreads(), nodeProbe.getCompactionManagerProxy().getMaximumCompactorThreads(), nodeProbe.getCompactionManagerProxy().getCoreValidationThreads(), nodeProbe.getCompactionManagerProxy().getMaximumValidatorThreads()); }
/** * Get compaction settings info for. * * @return compaction settings info. */ @Override public CompactionSettingsInfo getCompactionSettingsInfo() { return new CompactionSettingsInfo(nodeProbe.getCompactionThroughput(), nodeProbe.getCompactionManagerProxy().getCoreCompactorThreads(), nodeProbe.getCompactionManagerProxy().getMaximumCompactorThreads(), nodeProbe.getCompactionManagerProxy().getCoreValidationThreads(), nodeProbe.getCompactionManagerProxy().getMaximumValidatorThreads()); }
/** * Get compaction settings info for. * * @return compaction settings info. */ @Override public CompactionSettingsInfo getCompactionSettingsInfo() { return new CompactionSettingsInfo(nodeProbe.getCompactionThroughput(), nodeProbe.getCompactionManagerProxy().getCoreCompactorThreads(), nodeProbe.getCompactionManagerProxy().getMaximumCompactorThreads(), nodeProbe.getCompactionManagerProxy().getCoreValidationThreads(), nodeProbe.getCompactionManagerProxy().getMaximumValidatorThreads()); }
/** * Get compaction settings info for. * * @return compaction settings info. */ @Override public CompactionSettingsInfo getCompactionSettingsInfo() { return new CompactionSettingsInfo(nodeProbe.getCompactionThroughput(), nodeProbe.getCompactionManagerProxy().getCoreCompactorThreads(), nodeProbe.getCompactionManagerProxy().getMaximumCompactorThreads(), nodeProbe.getCompactionManagerProxy().getCoreValidationThreads(), nodeProbe.getCompactionManagerProxy().getMaximumValidatorThreads()); }
@Override public void execute(NodeProbe probe) { CompactionManagerMBean cm = probe.getCompactionManagerProxy(); Map<String, Map<String, Integer>> pendingTaskNumberByTable = (Map<String, Map<String, Integer>>) probe.getCompactionMetric("PendingTasksByTableName"); int numTotalPendingTask = 0; for (Entry<String, Map<String, Integer>> ksEntry : pendingTaskNumberByTable.entrySet()) { for (Entry<String, Integer> tableEntry : ksEntry.getValue().entrySet()) numTotalPendingTask += tableEntry.getValue(); } System.out.println("pending tasks: " + numTotalPendingTask); for (Entry<String, Map<String, Integer>> ksEntry : pendingTaskNumberByTable.entrySet()) { String ksName = ksEntry.getKey(); for (Entry<String, Integer> tableEntry : ksEntry.getValue().entrySet()) { String tableName = tableEntry.getKey(); int pendingTaskCount = tableEntry.getValue(); System.out.println("- " + ksName + '.' + tableName + ": " + pendingTaskCount); } } System.out.println(); reportCompactionTable(cm.getCompactions(), probe.getCompactionThroughput(), humanReadable); }
@Override public void execute(NodeProbe probe) { CompactionManagerMBean cm = probe.getCompactionManagerProxy(); Map<String, Map<String, Integer>> pendingTaskNumberByTable = (Map<String, Map<String, Integer>>) probe.getCompactionMetric("PendingTasksByTableName"); int numTotalPendingTask = 0; for (Entry<String, Map<String, Integer>> ksEntry : pendingTaskNumberByTable.entrySet()) { for (Entry<String, Integer> tableEntry : ksEntry.getValue().entrySet()) numTotalPendingTask += tableEntry.getValue(); } System.out.println("pending tasks: " + numTotalPendingTask); for (Entry<String, Map<String, Integer>> ksEntry : pendingTaskNumberByTable.entrySet()) { String ksName = ksEntry.getKey(); for (Entry<String, Integer> tableEntry : ksEntry.getValue().entrySet()) { String tableName = tableEntry.getKey(); int pendingTaskCount = tableEntry.getValue(); System.out.println("- " + ksName + '.' + tableName + ": " + pendingTaskCount); } } System.out.println(); reportCompactionTable(cm.getCompactions(), probe.getCompactionThroughput(), humanReadable); }
@Override public void execute(NodeProbe probe) { CompactionManagerMBean cm = probe.getCompactionManagerProxy(); Map<String, Map<String, Integer>> pendingTaskNumberByTable = (Map<String, Map<String, Integer>>) probe.getCompactionMetric("PendingTasksByTableName"); int numTotalPendingTask = 0; for (Entry<String, Map<String, Integer>> ksEntry : pendingTaskNumberByTable.entrySet()) { for (Entry<String, Integer> tableEntry : ksEntry.getValue().entrySet()) numTotalPendingTask += tableEntry.getValue(); } System.out.println("pending tasks: " + numTotalPendingTask); for (Entry<String, Map<String, Integer>> ksEntry : pendingTaskNumberByTable.entrySet()) { String ksName = ksEntry.getKey(); for (Entry<String, Integer> tableEntry : ksEntry.getValue().entrySet()) { String tableName = tableEntry.getKey(); int pendingTaskCount = tableEntry.getValue(); System.out.println("- " + ksName + '.' + tableName + ": " + pendingTaskCount); } } System.out.println(); reportCompactionTable(cm.getCompactions(), probe.getCompactionThroughput(), humanReadable); }
CompactionManagerMBean cm = probe.getCompactionManagerProxy(); System.out.println("pending tasks: " + probe.getCompactionMetric("PendingTasks")); long remainingBytes = 0;
CompactionManagerMBean compactionManagerMBean = (probe == null) ? null : probe.getCompactionManagerProxy();