Example usage for org.apache.cassandra.hadoop ConfigHelper getOutputColumnFamily

List of usage examples for org.apache.cassandra.hadoop ConfigHelper getOutputColumnFamily

Introduction

In this page you can find the example usage for org.apache.cassandra.hadoop ConfigHelper getOutputColumnFamily.

Prototype

public static String getOutputColumnFamily(Configuration conf) 

Source Link

Usage

From source file:com.buzzinate.dm.cassandra.ColumnFamilyOutputFormat.java

License:Apache License

private void checkOutputSpecs(Configuration conf) {
    if (ConfigHelper.getOutputKeyspace(conf) == null || ConfigHelper.getOutputColumnFamily(conf) == null) {
        throw new UnsupportedOperationException(
                "you must set the keyspace and columnfamily with setColumnFamily()");
    }//from w  w w .j  av a 2  s  .  c o  m
    if (ConfigHelper.getOutputPartitioner(conf) == null)
        throw new UnsupportedOperationException(
                "You must set the output partitioner to the one used by your Cassandra cluster");
    if (ConfigHelper.getOutputInitialAddress(conf) == null)
        throw new UnsupportedOperationException("You must set the initial output address to a Cassandra node");
}

From source file:de.hpi.isg.mdms.hadoop.cassandra.CqlBulkRecordWriter.java

License:Apache License

private void setConfigs() throws IOException {
    // if anything is missing, exceptions will be thrown here, instead of on write()
    keyspace = ConfigHelper.getOutputKeyspace(conf);
    columnFamily = ConfigHelper.getOutputColumnFamily(conf);
    schema = CqlBulkOutputFormat.getColumnFamilySchema(conf, columnFamily);
    insertStatement = CqlBulkOutputFormat.getColumnFamilyInsertStatement(conf, columnFamily);
    outputDir = getColumnFamilyDirectory();
    deleteSrc = CqlBulkOutputFormat.getDeleteSourceOnSuccess(conf);
}