org.apache.spark.storage.RDDInfo Java Examples

The following examples show how to use org.apache.spark.storage.RDDInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SparkExecutionContext.java    From systemds with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("resource")
public boolean isRDDCached( int rddID ) {
	//check that rdd is marked for caching
	JavaSparkContext jsc = getSparkContext();
	if( !jsc.sc().getPersistentRDDs().contains(rddID) ) {
		return false;
	}

	//check that rdd is actually already cached
	for( RDDInfo info : jsc.sc().getRDDStorageInfo() ) {
		if( info.id() == rddID )
			return info.isCached();
	}
	return false;
}
 
Example #2
Source File: SparkExecutionContext.java    From systemds with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("resource")
public boolean isRDDCached( int rddID ) {
	//check that rdd is marked for caching
	JavaSparkContext jsc = getSparkContext();
	if( !jsc.sc().getPersistentRDDs().contains(rddID) ) {
		return false;
	}

	//check that rdd is actually already cached
	for( RDDInfo info : jsc.sc().getRDDStorageInfo() ) {
		if( info.id() == rddID )
			return info.isCached();
	}
	return false;
}
 
Example #3
Source File: SparkStorageData.java    From dr-elephant with Apache License 2.0 4 votes vote down vote up
public List<RDDInfo> getRddInfoList() {
  return _rddInfoList;
}
 
Example #4
Source File: SparkStorageData.java    From dr-elephant with Apache License 2.0 4 votes vote down vote up
public void setRddInfoList(List<RDDInfo> rddInfoList) {
  _rddInfoList = rddInfoList;
}