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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]