use of org.apache.asterix.common.configuration.Property in project asterixdb by apache.
the class AsterixInstance method addDetailedInformation.
private void addDetailedInformation(StringBuilder buffer) {
buffer.append("Master node:" + cluster.getMasterNode().getId() + ":" + cluster.getMasterNode().getClusterIp() + "\n");
for (Node node : cluster.getNode()) {
buffer.append(node.getId() + ":" + node.getClusterIp() + "\n");
}
if (backupInfo != null && backupInfo.size() > 0) {
for (BackupInfo info : backupInfo) {
buffer.append(info + "\n");
}
}
buffer.append("\n");
buffer.append("Asterix version:" + asterixVersion + "\n");
buffer.append("Metadata Node:" + metadataNodeId + "\n");
buffer.append("Processes" + "\n");
for (ProcessInfo pInfo : runtimeState.getProcesses()) {
buffer.append(pInfo + "\n");
}
buffer.append("\n");
buffer.append("Asterix Configuration\n");
int lenMax = 0;
for (Property property : asterixConfiguration.getProperty()) {
int nextLen = property.getName().length();
if (nextLen > lenMax) {
lenMax = nextLen;
}
}
for (Property property : asterixConfiguration.getProperty()) {
buffer.append(property.getName() + getIndentation(property.getName(), lenMax) + ":" + property.getValue() + "\n");
}
}
use of org.apache.asterix.common.configuration.Property in project asterixdb by apache.
the class CheckpointingTest method setUp.
@Before
public void setUp() throws Exception {
System.out.println("SetUp: ");
TestHelper.deleteExistingInstanceFiles();
// Read default test configurations
AsterixConfiguration ac = TestHelper.getConfigurations(DEFAULT_TEST_CONFIG_FILE_NAME);
// Set log file size to 2MB
ac.getProperty().add(new Property(TransactionProperties.TXN_LOG_PARTITIONSIZE_KEY, String.valueOf(TXN_LOG_PARTITION_SIZE), ""));
// Disable checkpointing by making checkpoint thread wait max wait time
ac.getProperty().add(new Property(TransactionProperties.TXN_LOG_CHECKPOINT_POLLFREQUENCY_KEY, String.valueOf(Integer.MAX_VALUE), ""));
// Write test config file
TestHelper.writeConfigurations(ac, TEST_CONFIG_FILE_PATH);
}
use of org.apache.asterix.common.configuration.Property in project asterixdb by apache.
the class ConfigUtil method toAsterixExtension.
public static AsterixExtension toAsterixExtension(Extension ext) {
String className = ext.getExtensionClassName();
ArrayList<Pair<String, String>> args = new ArrayList<>();
for (Property property : ext.getProperty()) {
args.add(new Pair<>(property.getName(), property.getValue()));
}
return new AsterixExtension(className, args);
}
Aggregations