All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cloudgraph.hbase.spark.GraphSparkSetup Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.0.4
Show newest version
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