Search in sources :

Example 1 with Property

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");
    }
}
Also used : Node(org.apache.asterix.event.schema.cluster.Node) Property(org.apache.asterix.common.configuration.Property)

Example 2 with Property

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);
}
Also used : AsterixConfiguration(org.apache.asterix.common.configuration.AsterixConfiguration) Property(org.apache.asterix.common.configuration.Property) Before(org.junit.Before)

Example 3 with Property

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);
}
Also used : AsterixExtension(org.apache.asterix.common.config.AsterixExtension) ArrayList(java.util.ArrayList) Property(org.apache.asterix.common.configuration.Property) Pair(org.apache.hyracks.algebricks.common.utils.Pair)

Aggregations

Property (org.apache.asterix.common.configuration.Property)3 ArrayList (java.util.ArrayList)1 AsterixExtension (org.apache.asterix.common.config.AsterixExtension)1 AsterixConfiguration (org.apache.asterix.common.configuration.AsterixConfiguration)1 Node (org.apache.asterix.event.schema.cluster.Node)1 Pair (org.apache.hyracks.algebricks.common.utils.Pair)1 Before (org.junit.Before)1