public class QueryUtils
extends java.lang.Object
Constructor and Description |
---|
QueryUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.math.BigInteger> |
embeddedSelectorToPartitions(java.lang.String selector,
java.lang.String type,
DataPartitioner partitioner)
Method to convert the given selector into the extracted BigInteger partitions
|
static QueryResponseJSON |
extractQueryResponseJSON(QueryInfo queryInfo,
QuerySchema qSchema,
java.util.List<java.math.BigInteger> parts)
Method to convert the given BigInteger raw data element partitions to a QueryResponseJSON object based upon the given queryType
|
static java.lang.String |
getEmbeddedSelector(java.lang.String selector,
java.lang.String type,
DataPartitioner partitioner)
Method get the embedded selector from a given selector
|
static java.lang.String |
getEmbeddedSelectorFromPartitions(java.util.List<java.math.BigInteger> parts,
int partsIndex,
java.lang.String type,
java.lang.Object partitioner)
Reconstructs the String version of the embedded selector from its partitions
|
static java.lang.String |
getSelectorByQueryType(org.apache.hadoop.io.MapWritable dataMap,
QuerySchema qSchema,
DataSchema dSchema)
Pulls the correct selector from the MapWritable data element given the queryType
|
static java.lang.String |
getSelectorByQueryTypeJSON(QuerySchema qSchema,
org.json.simple.JSONObject dataMap)
Pulls the correct selector from the JSONObject data element given the queryType
|
static java.util.List<java.math.BigInteger> |
partitionDataElement(org.apache.hadoop.io.MapWritable dataMap,
QuerySchema qSchema,
DataSchema dSchema,
boolean embedSelector)
Method to convert the given data element given by the MapWritable data element into the extracted BigInteger partitions based upon the given queryType
|
static java.util.List<java.math.BigInteger> |
partitionDataElement(QuerySchema qSchema,
org.json.simple.JSONObject jsonData,
boolean embedSelector)
Method to convert the given data element given by the JSONObject data element into the extracted BigInteger partitions based upon the given queryType
|
public static QueryResponseJSON extractQueryResponseJSON(QueryInfo queryInfo, QuerySchema qSchema, java.util.List<java.math.BigInteger> parts) throws PIRException
PIRException
public static java.util.List<java.math.BigInteger> partitionDataElement(QuerySchema qSchema, org.json.simple.JSONObject jsonData, boolean embedSelector) throws PIRException
PIRException
public static java.util.List<java.math.BigInteger> partitionDataElement(org.apache.hadoop.io.MapWritable dataMap, QuerySchema qSchema, DataSchema dSchema, boolean embedSelector) throws PIRException
PIRException
public static java.util.List<java.math.BigInteger> embeddedSelectorToPartitions(java.lang.String selector, java.lang.String type, DataPartitioner partitioner) throws PIRException
PIRException
public static java.lang.String getEmbeddedSelector(java.lang.String selector, java.lang.String type, DataPartitioner partitioner) throws PIRException
PIRException
public static java.lang.String getEmbeddedSelectorFromPartitions(java.util.List<java.math.BigInteger> parts, int partsIndex, java.lang.String type, java.lang.Object partitioner) throws PIRException
PIRException
public static java.lang.String getSelectorByQueryType(org.apache.hadoop.io.MapWritable dataMap, QuerySchema qSchema, DataSchema dSchema)
Pulls first element of array if element is an array type
public static java.lang.String getSelectorByQueryTypeJSON(QuerySchema qSchema, org.json.simple.JSONObject dataMap)
Pulls first element of array if element is an array type