You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by tdas <gi...@git.apache.org> on 2014/12/27 01:13:10 UTC
[GitHub] spark pull request: Spark 3754 spark streaming file system api cal...
Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/2703#discussion_r22290108
--- Diff: streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaStreamingContext.scala ---
@@ -250,19 +250,19 @@ class JavaStreamingContext(val ssc: StreamingContext) extends Closeable {
* Files must be written to the monitored directory by "moving" them from another
* location within the same file system. File names starting with . are ignored.
* @param directory HDFS directory to monitor for new file
- * @tparam K Key type for reading HDFS file
- * @tparam V Value type for reading HDFS file
- * @tparam F Input format for reading HDFS file
+ * @param inputFormatClass Input format for reading HDFS file
+ * @param keyClass Key type for reading HDFS file
+ * @param valueClass Value type for reading HDFS file
*/
def fileStream[K, V, F <: NewInputFormat[K, V]](
- directory: String): JavaPairInputDStream[K, V] = {
- implicit val cmk: ClassTag[K] =
- implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[K]]
- implicit val cmv: ClassTag[V] =
- implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[V]]
- implicit val cmf: ClassTag[F] =
- implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[F]]
- ssc.fileStream[K, V, F](directory)
+ directory: String,
+ inputFormatClass: Class[F],
+ keyClass: Class[K],
+ valueClass: Class[V], newFilesOnly: Boolean = true): JavaPairInputDStream[K, V] = {
--- End diff --
Correction on this comment. newFilesOnly should be exposed as it is exposed in the Scala api.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org