Java Code Examples for org.apache.spark.api.java.JavaRDDLike#count()

The following examples show how to use org.apache.spark.api.java.JavaRDDLike#count() . 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: SharedTrainingMaster.java    From deeplearning4j with Apache License 2.0 5 votes vote down vote up
protected <T, Repr extends JavaRDDLike<T, Repr>> long getTotalDataSetObjectCount(
                JavaRDDLike<T, Repr> trainingData) {
    if (collectTrainingStats)
        stats.logCountStart();

    long totalDataSetObjectCount = trainingData.count();

    if (collectTrainingStats)
        stats.logCountEnd();

    return totalDataSetObjectCount;
}
 
Example 2
Source File: ParameterAveragingTrainingMaster.java    From deeplearning4j with Apache License 2.0 5 votes vote down vote up
protected <T, Repr extends JavaRDDLike<T, Repr>> long getTotalDataSetObjectCount(
                JavaRDDLike<T, Repr> trainingData) {
    if (collectTrainingStats)
        stats.logCountStart();
    long totalDataSetObjectCount = trainingData.count();
    if (collectTrainingStats)
        stats.logCountEnd();
    return totalDataSetObjectCount;
}