Skip to content

Commit

Permalink
fix arg parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
nextdude committed Sep 20, 2019
1 parent 5b9809a commit 003924f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import scala.collection.JavaConverters._
* @tparam DS The type of the input stream
* @tparam OUT The type of output stream elements
*/
abstract class BaseFlinkJob[DS, OUT <: FlinkEvent: TypeInformation] extends LazyLogging {
abstract class BaseFlinkJob[DS: TypeInformation, OUT <: FlinkEvent: TypeInformation] extends LazyLogging {

/**
* A pipeline for transforming a single stream. Passes the output of source()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ class FlinkConfig(

val (jobName, jobArgs, jobParams) = {
val (n, a) = args match {
case Array("help", _*) => ("help", Array.empty[String])
case Array(jn, "help", _*) => (jn, Array("--help"))
case Array(jn, _*) => (jn, args.tail)
case _ => ("help", Array.empty[String])
case Array(opt, _*) if opt.startsWith("-") => ("help", args)
case Array("help", _*) => ("help", args.tail)
case Array(jn, "help", _*) => (jn, Array("--help") ++ args.tail)
case Array(jn, _*) => (jn, args.tail)
case _ => ("help", args)
}
(n, a, ParameterTool.fromArgs(a))
}
Expand Down

0 comments on commit 003924f

Please sign in to comment.