Example usage for org.apache.hadoop.conf Configuration get

List of usage examples for org.apache.hadoop.conf Configuration get

Introduction

In this page you can find the example usage for org.apache.hadoop.conf Configuration get.

Prototype

public String get(String name, String defaultValue) 

Source Link

Document

Get the value of the name.

Usage

From source file:Hash.java

License:Apache License

/**
 * This utility method converts the name of the configured
 * hash type to a symbolic constant./*from   www  . j a v a  2  s  .  co m*/
 * @param conf configuration
 * @return one of the predefined constants
 */
public static int getHashType(Configuration conf) {
    String name = conf.get("hbase.hash.type", "murmur");
    return parseHashType(name);
}

From source file:RawParascaleFileSystem.java

License:Apache License

/**
 * The path of the parascale mount point.
 *
 * @return Path of the parascale mount point
 *//*from  ww  w  .  j  a v a2s  .  c o m*/
String getMountPoint() {
    final Configuration conf = getConf();
    return conf.get(PS_MOUNT_POINT, DEFAULT_MOUTPOINT);
}

From source file:RawParascaleFileSystem.java

License:Apache License

/**
 * Creates a new {@link ChunkLocator} instance.
 *
 * @return a new {@link ChunkLocator} instance
 *
 * @throws ChunkStorageException if the {@link ChunkLocator} throws an
 *                               {@link ChunkStorageException}
 *//*from   ww w .j a  v  a 2s  .c  o m*/
protected ChunkLocator newChunkLocator() throws ChunkStorageException {
    final Configuration conf = getConf();
    final URI endpoint = URI
            .create(conf.get(CHUNKS_REST_ENDPOINT, "http://localhost:14149/" + HTTPChunkLocator.DEFAULT_PATH));
    if (pLog.isDebugEnabled()) {
        pLog.debug("Create new REST based chunk locator - endpoint IP: " + endpoint);
    }
    return new HTTPChunkLocator(HttpClientHolder.client, endpoint);
}

From source file:alluxio.client.hadoop.DFSIOIntegrationTest.java

License:Apache License

private static String getBaseDir(org.apache.hadoop.conf.Configuration conf) {
    return conf.get("test.dfsio.build.data", "/benchmarks/DFSIOIntegrationTest");
}

From source file:andromache.config.CassandraConfigHelper.java

License:Apache License

public static int getInputRpcPort(Configuration conf) {
    if (conf.get(INPUT_THRIFT_PORT, "").equals("")) {
        return DEFAULT_THRIFT_PORT;
    }/* ww  w. j av  a2 s .c  om*/
    return Integer.parseInt(conf.get(INPUT_THRIFT_PORT));
}

From source file:andromache.config.CassandraConfigHelper.java

License:Apache License

public static String getOutputCompressionChunkLength(Configuration conf) {
    return conf.get(OUTPUT_COMPRESSION_CHUNK_LENGTH,
            String.valueOf(CompressionParameters.DEFAULT_CHUNK_LENGTH));
}

From source file:andromache.config.CassandraConfigHelper.java

License:Apache License

public static ITransportFactory getInputTransportFactory(Configuration conf) {
    return getTransportFactory(
            conf.get(INPUT_TRANSPORT_FACTORY_CLASS, TFramedTransportFactory.class.getName()));
}

From source file:andromache.config.CassandraConfigHelper.java

License:Apache License

public static ConsistencyLevel getWriteConsistencyLevel(Configuration conf) {
    return ConsistencyLevel.valueOf(conf.get(WRITE_CONSISTENCY_LEVEL, DEFAULT_CONSISTENCY_LEVEL));
}

From source file:andromache.config.CassandraConfigHelper.java

License:Apache License

public static ITransportFactory getOutputTransportFactory(Configuration conf) {
    return getTransportFactory(
            conf.get(OUTPUT_TRANSPORT_FACTORY_CLASS, TFramedTransportFactory.class.getName()));
}

From source file:andromache.config.CassandraConfigHelper.java

License:Apache License

public static ConsistencyLevel getReadConsistencyLevel(Configuration conf) {
    return ConsistencyLevel.valueOf(conf.get(READ_CONSISTENCY_LEVEL, DEFAULT_CONSISTENCY_LEVEL));
}