[jira] [Created] (FLINK-9152) Harmonize BroadcastProcessFunction Context names

2018-04-09 Thread Aljoscha Krettek (JIRA)
Aljoscha Krettek created FLINK-9152:
---

 Summary: Harmonize BroadcastProcessFunction Context names
 Key: FLINK-9152
 URL: https://issues.apache.org/jira/browse/FLINK-9152
 Project: Flink
  Issue Type: Improvement
  Components: DataStream API
Reporter: Aljoscha Krettek
Assignee: Aljoscha Krettek
 Fix For: 1.5.0


Currently, the {{Context}} on {{KeyedBroadcastProcessFunction}} is called 
{{KeyedContext}}, which is different from the name of the context on 
{{BroadcastProcessFunction}}. This leads to the strange combination of
{code:java}
public abstract void processBroadcastElement(final IN2 value, final 
KeyedContext ctx, final Collector out) throws Exception;
{code}
i.e. you're processing a broadcast element but the context is called a "keyed" 
context.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (FLINK-9151) standalone cluster scripts should pass FLINK_CONF_DIR to job manager and task managers

2018-04-09 Thread Christopher Ng (JIRA)
Christopher Ng created FLINK-9151:
-

 Summary: standalone cluster scripts should pass FLINK_CONF_DIR to 
job manager and task managers
 Key: FLINK-9151
 URL: https://issues.apache.org/jira/browse/FLINK-9151
 Project: Flink
  Issue Type: Improvement
Reporter: Christopher Ng


At the moment FLINK_CONF_DIR is not passed to the job manager and task manager 
when they are started over SSH.  This means that if the user has a locally set 
FLINK_CONF_DIR that is not configured by their login shell, it is not used by 
the launched job manager and task manager which can result in silently failing 
to launch if there are errors due to Flink not using the correct config dir.

One particular inconsistency is that a TaskManagers may be launched locally 
(without ssh) on localhost, but JobManagers are always launched over ssh.  In 
my particular case this meant that the TaskManager launched but the JobManager 
silently failed to launch.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (FLINK-9150) Prepare for Java 10

2018-04-09 Thread Ted Yu (JIRA)
Ted Yu created FLINK-9150:
-

 Summary: Prepare for Java 10
 Key: FLINK-9150
 URL: https://issues.apache.org/jira/browse/FLINK-9150
 Project: Flink
  Issue Type: Task
Reporter: Ted Yu


When compiling with Java 10, I see the following compilation error:
{code}
[ERROR] Failed to execute goal on project flink-shaded-hadoop2: Could not 
resolve dependencies for project 
org.apache.flink:flink-shaded-hadoop2:jar:1.6-SNAPSHOT: Could not find artifact 
jdk.tools:jdk.tools:jar:1.6 at specified path /a/jdk-10/../lib/tools.jar -> 
[Help 1]
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (FLINK-9149) The creation of the ExecutionPlan fails when you combine a SideOutput with an SplitStream.

2018-04-09 Thread Fred Teunissen (JIRA)
Fred Teunissen created FLINK-9149:
-

 Summary: The creation of the ExecutionPlan fails when you combine 
a SideOutput with an SplitStream.
 Key: FLINK-9149
 URL: https://issues.apache.org/jira/browse/FLINK-9149
 Project: Flink
  Issue Type: Bug
  Components: DataStream API
Affects Versions: 1.4.2
Reporter: Fred Teunissen


The creation of the ExecutionPlan fails when you combine a SideOutput with an 
SplitStream.

Code:
{code:java}
import org.apache.flink.streaming.api.functions.ProcessFunction
import org.apache.flink.streaming.api.scala._
import org.apache.flink.util.Collector

object SideOutputTest {
  def main(args: Array[String]) {
val env = StreamExecutionEnvironment.getExecutionEnvironment
env.setParallelism(3)

val inputLongStream = env.generateSequence(0L, 100L)

val filteredLongStream = inputLongStream.process(new LogFilterFunction)
val splittedLongStream = filteredLongStream.split(l => Seq((l%4).toString))
// workaround
//  val splittedLongStream = filteredLongStream.map(x=>x).split(l => 
Seq((l%4).toString))

val oneStream = splittedLongStream.select("1").map(l => l+1000)
val twoStream = splittedLongStream.select("2").map(l => l+2000)
val threeStream = splittedLongStream.select("3").map(l => l+3000)

oneStream.union(twoStream, threeStream).print()

val loggingStream = filteredLongStream.getSideOutput(loggingOutputTag)
loggingStream.print()

println(env.getExecutionPlan)

env.execute()
  }

  val loggingOutputTag = OutputTag[String]("loggingStream")
}

class LogFilterFunction extends ProcessFunction[Long, Long] {
  override def processElement(value: Long, ctx: ProcessFunction[Long, 
Long]#Context, out: Collector[Long]): Unit = {
if (value % 4 == 0) {
  ctx.output(SideOutputTest.loggingOutputTag, s"LogFilterFunction logging 
for $value")
}else {
  out.collect(value)
}
  }
}
{code}
Exception:
{noformat}
Exception in thread "main" 
org.apache.flink.runtime.client.JobExecutionException: Job execution failed.
at 
org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$6.apply$mcV$sp(JobManager.scala:897)
at 
org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$6.apply(JobManager.scala:840)
at 
org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$6.apply(JobManager.scala:840)
at 
scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)
at 
akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at 
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at 
scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.NullPointerException
at 
org.apache.flink.streaming.api.collector.selector.DirectedOutput.(DirectedOutput.java:74)
at 
org.apache.flink.streaming.runtime.tasks.OperatorChain.createOutputCollector(OperatorChain.java:331)
at 
org.apache.flink.streaming.runtime.tasks.OperatorChain.createChainedOperator(OperatorChain.java:346)
at 
org.apache.flink.streaming.runtime.tasks.OperatorChain.createOutputCollector(OperatorChain.java:282)
at 
org.apache.flink.streaming.runtime.tasks.OperatorChain.(OperatorChain.java:126)
at 
org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:231)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:718)
at java.lang.Thread.run(Thread.java:748)
{noformat}
Workaround:

add a redundant *map(x=>x)* before the *split* function.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)