Search in sources :

Example 1 with VertexScanJob

use of com.thinkaurelius.titan.graphdb.olap.VertexScanJob in project titan by thinkaurelius.

the class HadoopVertexScanMapper method setup.

@Override
protected void setup(Context context) throws IOException, InterruptedException {
    /* Don't call super implementation super.setup(context); */
    org.apache.hadoop.conf.Configuration hadoopConf = DEFAULT_COMPAT.getContextConfiguration(context);
    ModifiableHadoopConfiguration scanConf = ModifiableHadoopConfiguration.of(TitanHadoopConfiguration.MAPRED_NS, hadoopConf);
    VertexScanJob vertexScan = getVertexScanJob(scanConf);
    ModifiableConfiguration graphConf = getTitanConfiguration(context);
    TitanGraph graph = TitanFactory.open(graphConf);
    job = VertexJobConverter.convert(graph, vertexScan);
    metrics = new HadoopContextScanMetrics(context);
    finishSetup(scanConf, graphConf);
}
Also used : TitanGraph(com.thinkaurelius.titan.core.TitanGraph) Configuration(org.apache.hadoop.conf.Configuration) VertexScanJob(com.thinkaurelius.titan.graphdb.olap.VertexScanJob) ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration) ModifiableHadoopConfiguration(com.thinkaurelius.titan.hadoop.config.ModifiableHadoopConfiguration)

Aggregations

TitanGraph (com.thinkaurelius.titan.core.TitanGraph)1 ModifiableConfiguration (com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)1 VertexScanJob (com.thinkaurelius.titan.graphdb.olap.VertexScanJob)1 ModifiableHadoopConfiguration (com.thinkaurelius.titan.hadoop.config.ModifiableHadoopConfiguration)1 Configuration (org.apache.hadoop.conf.Configuration)1