org.cloudgraph.hbase.spark.GraphSparkSetup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudgraph-hbase Show documentation
Show all versions of cloudgraph-hbase Show documentation
CloudGraph(tm) is a suite of Service Data Object (SDO) 2.1 services designed for relational and big-table style "cloud" databases, such as HBase and others.
package org.cloudgraph.hbase.spark;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.mapreduce.Job;
import org.cloudgraph.job.JobSetup;
import org.plasma.query.Query;
import org.plasma.query.collector.SelectionCollector;
import org.plasma.query.model.Where;
import org.plasma.sdo.PlasmaType;
public class GraphSparkSetup extends JobSetup {
public static void setupJob(Query query, Job job) {
Configuration conf = job.getConfiguration();
HBaseConfiguration.merge(conf, HBaseConfiguration.create(conf));
PlasmaType type = getRootType(query);
Where where = query.getModel().findWhereClause();
SelectionCollector selectionCollector = null;
if (where != null)
selectionCollector = new SelectionCollector(query.getModel()
.getSelectClause(), where, type);
else
selectionCollector = new SelectionCollector(query.getModel()
.getSelectClause(), type);
selectionCollector.setOnlyDeclaredProperties(false);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy