org.apache.lens.rdd
Class LensRDDClient.LensRDDResult

java.lang.Object
  extended by org.apache.lens.rdd.LensRDDClient.LensRDDResult
All Implemented Interfaces:
Serializable
Enclosing class:
LensRDDClient

public static class LensRDDClient.LensRDDResult
extends Object
implements Serializable

Container object to store the RDD and corresponding Lens query handle.

See Also:
Serialized Form

Constructor Summary
LensRDDClient.LensRDDResult()
          Instantiates a new lens rdd result.
LensRDDClient.LensRDDResult(org.apache.spark.rdd.RDD<List<Object>> rdd, QueryHandle lensQuery, String tempTableName)
          Instantiates a new lens rdd result.
 
Method Summary
 void deleteTempTable()
          Delete temp table.
 QueryHandle getLensQuery()
           
 org.apache.spark.rdd.RDD<List<Object>> getRDD()
           
 String getTempTableName()
           
 org.apache.spark.rdd.RDD<List<Object>> recreateRDD(org.apache.spark.api.java.JavaSparkContext sparkContext)
          Recreate RDD.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LensRDDClient.LensRDDResult

public LensRDDClient.LensRDDResult(org.apache.spark.rdd.RDD<List<Object>> rdd,
                                   QueryHandle lensQuery,
                                   String tempTableName)
Instantiates a new lens rdd result.

Parameters:
rdd - the rdd
lensQuery - the lens query
tempTableName - the temp table name

LensRDDClient.LensRDDResult

public LensRDDClient.LensRDDResult()
Instantiates a new lens rdd result.

Method Detail

getLensQuery

public QueryHandle getLensQuery()

getRDD

public org.apache.spark.rdd.RDD<List<Object>> getRDD()

recreateRDD

public org.apache.spark.rdd.RDD<List<Object>> recreateRDD(org.apache.spark.api.java.JavaSparkContext sparkContext)
                                                   throws LensException
Recreate RDD. This will work if the result object was saved. As long as the metastore and corresponding HDFS directory is available result object should be able to recreate an RDD.

Parameters:
sparkContext - the spark context
Returns:
the rdd
Throws:
LensException - the lens exception

getTempTableName

public String getTempTableName()

deleteTempTable

public void deleteTempTable()
                     throws LensException
Delete temp table. This should be done to release underlying temp table.

Throws:
LensException - the lens exception


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.