Java Code Examples for org.apache.spark.api.java.JavaRDDLike#getNumPartitions()
The following examples show how to use
org.apache.spark.api.java.JavaRDDLike#getNumPartitions() .
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: SparkUtils.java From spliceengine with GNU Affero General Public License v3.0 | 4 votes |
public static int getPartitions(JavaRDDLike<?,?> rdd) { int rddPartitions = rdd.getNumPartitions(); return Math.max(rddPartitions, getDefaultPartitions()); }
Example 2
Source File: SparkUtils.java From spliceengine with GNU Affero General Public License v3.0 | 4 votes |
public static int getPartitions(JavaRDDLike<?,?> rdd1, JavaRDDLike<?,?> rdd2) { int rddPartitions1 = rdd1.getNumPartitions(); int rddPartitions2 = rdd2.getNumPartitions(); int max = Math.max(rddPartitions1, rddPartitions2); return Math.max(max, getDefaultPartitions()); }