org.apache.accumulo.examples.wikisearch.ingest
Class WikipediaConfiguration

java.lang.Object
  extended by org.apache.accumulo.examples.wikisearch.ingest.WikipediaConfiguration

public class WikipediaConfiguration
extends Object


Field Summary
static String ANALYZER
           
static String BULK_INGEST
           
static String BULK_INGEST_BUFFER_SIZE
           
static String BULK_INGEST_DIR
           
static String BULK_INGEST_FAILURE_DIR
           
static String INSTANCE_NAME
           
static String LANGUAGES_FILENAME
           
static String NAMESPACES_FILENAME
           
static String NUM_GROUPS
           
static String NUM_PARTITIONS
           
static String PARTITIONED_ARTICLES_DIRECTORY
           
static String PARTITIONED_INPUT_MIN_SPLIT_SIZE
           
static String PASSWORD
           
static String RUN_INGEST
           
static String RUN_PARTITIONER
           
static String TABLE_NAME
           
static String USER
           
static String WORKING_DIRECTORY
           
static String ZOOKEEPERS
           
 
Constructor Summary
WikipediaConfiguration()
           
 
Method Summary
static boolean bulkIngest(org.apache.hadoop.conf.Configuration conf)
           
static long bulkIngestBufferSize(org.apache.hadoop.conf.Configuration conf)
           
static String bulkIngestDir(org.apache.hadoop.conf.Configuration conf)
           
static String bulkIngestFailureDir(org.apache.hadoop.conf.Configuration conf)
           
static org.apache.lucene.analysis.Analyzer getAnalyzer(org.apache.hadoop.conf.Configuration conf)
           
static Connector getConnector(org.apache.hadoop.conf.Configuration conf)
           
static Instance getInstance(org.apache.hadoop.conf.Configuration conf)
           
static String getInstanceName(org.apache.hadoop.conf.Configuration conf)
           
static org.apache.hadoop.fs.Path getLanguagesFile(org.apache.hadoop.conf.Configuration conf)
           
static long getMinInputSplitSize(org.apache.hadoop.conf.Configuration conf)
           
static org.apache.hadoop.fs.Path getNamespacesFile(org.apache.hadoop.conf.Configuration conf)
           
static int getNumGroups(org.apache.hadoop.conf.Configuration conf)
           
static int getNumPartitions(org.apache.hadoop.conf.Configuration conf)
           
static org.apache.hadoop.fs.Path getPartitionedArticlesPath(org.apache.hadoop.conf.Configuration conf)
           
static byte[] getPassword(org.apache.hadoop.conf.Configuration conf)
           
static String getTableName(org.apache.hadoop.conf.Configuration conf)
           
static String getUser(org.apache.hadoop.conf.Configuration conf)
           
static org.apache.hadoop.fs.Path getWorkingDirectory(org.apache.hadoop.conf.Configuration conf)
           
static String getZookeepers(org.apache.hadoop.conf.Configuration conf)
           
static
<T> T
isNull(org.apache.hadoop.conf.Configuration conf, String propertyName, Class<T> resultClass)
          Helper method to get properties from Hadoop configuration
static boolean runIngest(org.apache.hadoop.conf.Configuration conf)
           
static boolean runPartitioner(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE_NAME

public static final String INSTANCE_NAME
See Also:
Constant Field Values

USER

public static final String USER
See Also:
Constant Field Values

PASSWORD

public static final String PASSWORD
See Also:
Constant Field Values

TABLE_NAME

public static final String TABLE_NAME
See Also:
Constant Field Values

ZOOKEEPERS

public static final String ZOOKEEPERS
See Also:
Constant Field Values

NAMESPACES_FILENAME

public static final String NAMESPACES_FILENAME
See Also:
Constant Field Values

LANGUAGES_FILENAME

public static final String LANGUAGES_FILENAME
See Also:
Constant Field Values

WORKING_DIRECTORY

public static final String WORKING_DIRECTORY
See Also:
Constant Field Values

ANALYZER

public static final String ANALYZER
See Also:
Constant Field Values

NUM_PARTITIONS

public static final String NUM_PARTITIONS
See Also:
Constant Field Values

NUM_GROUPS

public static final String NUM_GROUPS
See Also:
Constant Field Values

PARTITIONED_ARTICLES_DIRECTORY

public static final String PARTITIONED_ARTICLES_DIRECTORY
See Also:
Constant Field Values

RUN_PARTITIONER

public static final String RUN_PARTITIONER
See Also:
Constant Field Values

RUN_INGEST

public static final String RUN_INGEST
See Also:
Constant Field Values

BULK_INGEST

public static final String BULK_INGEST
See Also:
Constant Field Values

BULK_INGEST_DIR

public static final String BULK_INGEST_DIR
See Also:
Constant Field Values

BULK_INGEST_FAILURE_DIR

public static final String BULK_INGEST_FAILURE_DIR
See Also:
Constant Field Values

BULK_INGEST_BUFFER_SIZE

public static final String BULK_INGEST_BUFFER_SIZE
See Also:
Constant Field Values

PARTITIONED_INPUT_MIN_SPLIT_SIZE

public static final String PARTITIONED_INPUT_MIN_SPLIT_SIZE
See Also:
Constant Field Values
Constructor Detail

WikipediaConfiguration

public WikipediaConfiguration()
Method Detail

getUser

public static String getUser(org.apache.hadoop.conf.Configuration conf)

getPassword

public static byte[] getPassword(org.apache.hadoop.conf.Configuration conf)

getTableName

public static String getTableName(org.apache.hadoop.conf.Configuration conf)

getInstanceName

public static String getInstanceName(org.apache.hadoop.conf.Configuration conf)

getZookeepers

public static String getZookeepers(org.apache.hadoop.conf.Configuration conf)

getNamespacesFile

public static org.apache.hadoop.fs.Path getNamespacesFile(org.apache.hadoop.conf.Configuration conf)

getLanguagesFile

public static org.apache.hadoop.fs.Path getLanguagesFile(org.apache.hadoop.conf.Configuration conf)

getWorkingDirectory

public static org.apache.hadoop.fs.Path getWorkingDirectory(org.apache.hadoop.conf.Configuration conf)

getAnalyzer

public static org.apache.lucene.analysis.Analyzer getAnalyzer(org.apache.hadoop.conf.Configuration conf)
                                                       throws IOException
Throws:
IOException

getConnector

public static Connector getConnector(org.apache.hadoop.conf.Configuration conf)
                              throws AccumuloException,
                                     AccumuloSecurityException
Throws:
AccumuloException
AccumuloSecurityException

getInstance

public static Instance getInstance(org.apache.hadoop.conf.Configuration conf)

getNumPartitions

public static int getNumPartitions(org.apache.hadoop.conf.Configuration conf)

getNumGroups

public static int getNumGroups(org.apache.hadoop.conf.Configuration conf)

getPartitionedArticlesPath

public static org.apache.hadoop.fs.Path getPartitionedArticlesPath(org.apache.hadoop.conf.Configuration conf)

getMinInputSplitSize

public static long getMinInputSplitSize(org.apache.hadoop.conf.Configuration conf)

runPartitioner

public static boolean runPartitioner(org.apache.hadoop.conf.Configuration conf)

runIngest

public static boolean runIngest(org.apache.hadoop.conf.Configuration conf)

bulkIngest

public static boolean bulkIngest(org.apache.hadoop.conf.Configuration conf)

bulkIngestDir

public static String bulkIngestDir(org.apache.hadoop.conf.Configuration conf)

bulkIngestFailureDir

public static String bulkIngestFailureDir(org.apache.hadoop.conf.Configuration conf)

bulkIngestBufferSize

public static long bulkIngestBufferSize(org.apache.hadoop.conf.Configuration conf)

isNull

public static <T> T isNull(org.apache.hadoop.conf.Configuration conf,
                           String propertyName,
                           Class<T> resultClass)
Helper method to get properties from Hadoop configuration

Type Parameters:
T -
Parameters:
conf -
propertyName -
resultClass -
Returns:
value of property
Throws:
IllegalArgumentException - if property is not defined, null, or empty. Or if resultClass is not handled.


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.