Skip to content

Commit 5d20f4a

Browse files
authored
Merge pull request #165 from yukim/CDM-84
[CDM-84] Improve usage of Apache Spark
2 parents e279fae + 9efb866 commit 5d20f4a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@
4646
<artifactId>log4j-slf4j-impl</artifactId>
4747
</exclusion>
4848
</exclusions>
49+
<scope>provided</scope>
4950
</dependency>
5051
<dependency>
5152
<groupId>org.apache.spark</groupId>
5253
<artifactId>spark-sql_${scala.main.version}</artifactId>
5354
<version>${spark.version}</version>
55+
<scope>provided</scope>
5456
</dependency>
5557
<dependency>
5658
<groupId>org.apache.spark</groupId>
@@ -66,6 +68,7 @@
6668
<artifactId>apache-log4j-extras</artifactId>
6769
</exclusion>
6870
</exclusions>
71+
<scope>provided</scope>
6972
</dependency>
7073
<dependency>
7174
<groupId>com.datastax.spark</groupId>

src/main/scala/com/datastax/cdm/job/BaseJob.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ abstract class BaseJob[T: ClassTag] extends App {
8282
this.parts = getParts(numSplits)
8383
this.slices = sContext.parallelize(parts.asScala.toSeq, parts.size);
8484
abstractLogger.info("PARAM Calculated -- Total Partitions: " + parts.size())
85-
abstractLogger.info("Spark parallelize created : " + slices.count() + " slices!");
85+
abstractLogger.info("Spark parallelize created : " + slices.getNumPartitions + " slices!");
8686
}
8787

8888
def getParts(pieces: Int): util.Collection[T]

0 commit comments

Comments
 (0)