Repository: incubator-samza Updated Branches: refs/heads/master 464a7e27d -> df6e11afc
SAMZA-161: Fix the warnings in check task Project: http://git-wip-us.apache.org/repos/asf/incubator-samza/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-samza/commit/df6e11af Tree: http://git-wip-us.apache.org/repos/asf/incubator-samza/tree/df6e11af Diff: http://git-wip-us.apache.org/repos/asf/incubator-samza/diff/df6e11af Branch: refs/heads/master Commit: df6e11afc3a0bc981d98281d0c5cdde8f5a56e73 Parents: 464a7e2 Author: Jakob Homan <[email protected]> Authored: Wed Mar 19 14:09:24 2014 -0700 Committer: Jakob Homan <[email protected]> Committed: Wed Mar 19 14:09:24 2014 -0700 ---------------------------------------------------------------------- build.gradle | 7 +++++++ gradle/dependency-versions-scala-2.10.gradle | 5 +++++ gradle/dependency-versions-scala-2.9.2.gradle | 1 + gradle/license.gradle | 5 +++++ .../samza/config/DefaultChooserConfig.scala | 3 ++- .../samza/serializers/CheckpointSerde.scala | 6 +++--- .../apache/samza/system/SystemConsumers.scala | 2 +- .../apache/samza/system/kafka/BrokerProxy.scala | 2 +- .../samza/config/TestKafkaSerdeConfig.scala | 2 +- .../system/kafka/TestKafkaSystemFactory.scala | 4 ++-- .../test/integration/SimpleStatefulTask.java | 19 +++++++++++++++++++ .../test/integration/StatePerfTestTask.java | 19 +++++++++++++++++++ .../samza/test/integration/join/Checker.java | 19 +++++++++++++++++++ .../samza/test/integration/join/Emitter.java | 19 +++++++++++++++++++ .../test/integration/join/EpochPartitioner.java | 19 +++++++++++++++++++ .../samza/test/integration/join/Joiner.java | 19 +++++++++++++++++++ .../samza/test/integration/join/Watcher.java | 19 +++++++++++++++++++ samza-test/src/main/resources/common.properties | 17 +++++++++++++++++ .../main/resources/hello-stateful-world.samsa | 18 ++++++++++++++++++ samza-test/src/main/resources/join/checker.samsa | 18 ++++++++++++++++++ samza-test/src/main/resources/join/emitter.samsa | 18 ++++++++++++++++++ samza-test/src/main/resources/join/joiner.samsa | 18 ++++++++++++++++++ samza-test/src/main/resources/join/watcher.samsa | 18 ++++++++++++++++++ samza-test/src/main/resources/log4j.xml | 10 ++++++++++ samza-test/src/main/resources/perf/counter.samsa | 18 ++++++++++++++++++ .../job/yarn/TestSamzaAppMasterLifecycle.scala | 4 ++-- .../job/yarn/TestSamzaAppMasterTaskManager.scala | 4 ++-- 27 files changed, 300 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index fc59626..8e369b8 100644 --- a/build.gradle +++ b/build.gradle @@ -24,8 +24,15 @@ apply from: file("gradle/dependency-versions-scala-" + scalaVersion + ".gradle") allprojects { apply plugin: 'idea' + + // For all scala compilation, add extra compiler options, taken from version-specific + // dependency-versions-scala file applied above. + tasks.withType(ScalaCompile) { + scalaCompileOptions.additionalParameters = [ scalaOptions ] + } } + subprojects { apply plugin: 'jacoco' apply plugin: 'eclipse' http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/gradle/dependency-versions-scala-2.10.gradle ---------------------------------------------------------------------- diff --git a/gradle/dependency-versions-scala-2.10.gradle b/gradle/dependency-versions-scala-2.10.gradle index 47de65a..2a3632d 100644 --- a/gradle/dependency-versions-scala-2.10.gradle +++ b/gradle/dependency-versions-scala-2.10.gradle @@ -1,6 +1,11 @@ ext { scalaVersion = "2.10" scalaLibVersion = "2.10.2" + // Extra options for the compiler: + // -feature: Give detailed warnings about language feature use (rather than just 'there were 4 warnings') + // -language:implicitConversions: Allow the use of implicit conversions without warning or library import + // -language:reflectiveCalls: Allow the automatic use of reflection to access fields without warning or library import + scalaOptions = "-feature -language:implicitConversions -language:reflectiveCalls" grizzledVersion = "1.0.1" scalatraVersion = "2.2.1" jettyVersion = "8.1.8.v20121106" http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/gradle/dependency-versions-scala-2.9.2.gradle ---------------------------------------------------------------------- diff --git a/gradle/dependency-versions-scala-2.9.2.gradle b/gradle/dependency-versions-scala-2.9.2.gradle index e7b56a6..7ec296f 100644 --- a/gradle/dependency-versions-scala-2.9.2.gradle +++ b/gradle/dependency-versions-scala-2.9.2.gradle @@ -1,6 +1,7 @@ ext { scalaVersion = "2.9.2" scalaLibVersion = "2.9.2" + scalaOptions = "" grizzledVersion = "0.6.10" scalatraVersion = "2.2.1" jettyVersion = "8.1.8.v20121106" http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/gradle/license.gradle ---------------------------------------------------------------------- diff --git a/gradle/license.gradle b/gradle/license.gradle index b4b62eb..ca504e4 100644 --- a/gradle/license.gradle +++ b/gradle/license.gradle @@ -5,5 +5,10 @@ subprojects { header rootProject.file('HEADER') // Skip Twitter bootstrap JS and CSS. skipExistingHeaders = true + mapping { + // Treat integration scripts (with .samsa extension) as + // regular scripts, as they use the same comment style + samsa='SCRIPT_STYLE' + } } } http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-core/src/main/scala/org/apache/samza/config/DefaultChooserConfig.scala ---------------------------------------------------------------------- diff --git a/samza-core/src/main/scala/org/apache/samza/config/DefaultChooserConfig.scala b/samza-core/src/main/scala/org/apache/samza/config/DefaultChooserConfig.scala index 9351c66..4224393 100644 --- a/samza-core/src/main/scala/org/apache/samza/config/DefaultChooserConfig.scala +++ b/samza-core/src/main/scala/org/apache/samza/config/DefaultChooserConfig.scala @@ -46,4 +46,5 @@ class DefaultChooserConfig(config: Config) extends ScalaMapConfig(config) { .map(systemStream => (systemStream, getOrElse(PRIORITY format (systemStream.getSystem, systemStream.getStream), "-1").toInt)) .filter(_._2 >= 0) .toMap -} \ No newline at end of file +} + http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-core/src/main/scala/org/apache/samza/serializers/CheckpointSerde.scala ---------------------------------------------------------------------- diff --git a/samza-core/src/main/scala/org/apache/samza/serializers/CheckpointSerde.scala b/samza-core/src/main/scala/org/apache/samza/serializers/CheckpointSerde.scala index 0d82183..f93f1c8 100644 --- a/samza-core/src/main/scala/org/apache/samza/serializers/CheckpointSerde.scala +++ b/samza-core/src/main/scala/org/apache/samza/serializers/CheckpointSerde.scala @@ -38,12 +38,12 @@ class CheckpointSerde extends Serde[Checkpoint] { } return new Checkpoint(checkpointMap) } catch { - case _ => return null + case _ : Throwable => return null } } def toBytes(checkpoint: Checkpoint) = { - val offsetMap = asJavaMap(checkpoint + val offsetMap = mapAsJavaMap(checkpoint .getOffsets // Convert Map[SystemStream, String] offset map to a iterable of tuples (system, stream, offset) .map { case (systemStream, offset) => (systemStream.getSystem, systemStream.getStream, offset) } @@ -52,7 +52,7 @@ class CheckpointSerde extends Serde[Checkpoint] { // Group the tuples for each system into a Map[String, String] for stream to offsets .map { case (systemName, tuples) => - val streamToOffestMap = asJavaMap(tuples + val streamToOffestMap = mapAsJavaMap(tuples // Group the tuples by stream name .groupBy(_._2) // There should only ever be one SystemStream to offset mapping, so just http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala ---------------------------------------------------------------------- diff --git a/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala b/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala index dfa3cd7..b715937 100644 --- a/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala +++ b/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala @@ -290,7 +290,7 @@ class SystemConsumers( * systemFetchMapCache stays in sync with fetchMap. */ private def updateFetchMap(systemStreamPartition: SystemStreamPartition, amount: Int = 1) { - val fetchSize = fetchMap.getOrElse(systemStreamPartition, new Integer(0)).intValue + amount + val fetchSize = fetchMap.getOrElse(systemStreamPartition, java.lang.Integer.valueOf(0)).intValue + amount val systemName = systemStreamPartition.getSystem var systemFetchMap = systemFetchMapCache.getOrElse(systemName, Map()) http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-kafka/src/main/scala/org/apache/samza/system/kafka/BrokerProxy.scala ---------------------------------------------------------------------- diff --git a/samza-kafka/src/main/scala/org/apache/samza/system/kafka/BrokerProxy.scala b/samza-kafka/src/main/scala/org/apache/samza/system/kafka/BrokerProxy.scala index 10855dc..c5ad1c8 100644 --- a/samza-kafka/src/main/scala/org/apache/samza/system/kafka/BrokerProxy.scala +++ b/samza-kafka/src/main/scala/org/apache/samza/system/kafka/BrokerProxy.scala @@ -224,7 +224,7 @@ class BrokerProxy( // UnknownTopic or NotLeader are routine events and handled via abdication. All others, bail. case _ @ (_:UnknownTopicOrPartitionException | _: NotLeaderForPartitionException) => warn("Received (UnknownTopicOr|NotLeaderFor)Partition exception. Abdicating") abdicate(e.tp) - case other => throw other + case other : Throwable => throw other } }) } http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-kafka/src/test/scala/org/apache/samza/config/TestKafkaSerdeConfig.scala ---------------------------------------------------------------------- diff --git a/samza-kafka/src/test/scala/org/apache/samza/config/TestKafkaSerdeConfig.scala b/samza-kafka/src/test/scala/org/apache/samza/config/TestKafkaSerdeConfig.scala index 2e7459e..fabae68 100644 --- a/samza-kafka/src/test/scala/org/apache/samza/config/TestKafkaSerdeConfig.scala +++ b/samza-kafka/src/test/scala/org/apache/samza/config/TestKafkaSerdeConfig.scala @@ -29,7 +29,7 @@ class TestKafkaSerdeConfig { val paramsToTest = List( "serializers.registry.test.encoder", "serializers.registry.test.decoder") - val config = new MapConfig(asJavaMap(paramsToTest.map { m => (m, MAGIC_VAL) } toMap)) + val config = new MapConfig(mapAsJavaMap(paramsToTest.map { m => (m, MAGIC_VAL) }.toMap)) @Test def testKafkaConfigurationIsBackwardsCompatible { http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemFactory.scala ---------------------------------------------------------------------- diff --git a/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemFactory.scala b/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemFactory.scala index 2a74ea5..d08b9fa 100644 --- a/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemFactory.scala +++ b/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemFactory.scala @@ -39,7 +39,7 @@ class TestKafkaSystemFactory { fail("Expected to get a Samza exception.") } catch { case e: SamzaException => None // expected - case _ => fail("Expected to get a Samza exception.") + case _ : Throwable => fail("Expected to get a Samza exception.") } } @@ -56,7 +56,7 @@ class TestKafkaSystemFactory { fail("Expected to get a Samza exception.") } catch { case e: SamzaException => None // expected - case _ => fail("Expected to get a Samza exception.") + case _ : Throwable => fail("Expected to get a Samza exception.") } } http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/java/org/apache/samza/test/integration/SimpleStatefulTask.java ---------------------------------------------------------------------- diff --git a/samza-test/src/main/java/org/apache/samza/test/integration/SimpleStatefulTask.java b/samza-test/src/main/java/org/apache/samza/test/integration/SimpleStatefulTask.java index 973b0ba..46f6ef6 100644 --- a/samza-test/src/main/java/org/apache/samza/test/integration/SimpleStatefulTask.java +++ b/samza-test/src/main/java/org/apache/samza/test/integration/SimpleStatefulTask.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.apache.samza.test.integration; import org.apache.samza.config.Config; http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/java/org/apache/samza/test/integration/StatePerfTestTask.java ---------------------------------------------------------------------- diff --git a/samza-test/src/main/java/org/apache/samza/test/integration/StatePerfTestTask.java b/samza-test/src/main/java/org/apache/samza/test/integration/StatePerfTestTask.java index 873de74..d84db5e 100644 --- a/samza-test/src/main/java/org/apache/samza/test/integration/StatePerfTestTask.java +++ b/samza-test/src/main/java/org/apache/samza/test/integration/StatePerfTestTask.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.apache.samza.test.integration; import org.apache.samza.config.Config; http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/java/org/apache/samza/test/integration/join/Checker.java ---------------------------------------------------------------------- diff --git a/samza-test/src/main/java/org/apache/samza/test/integration/join/Checker.java b/samza-test/src/main/java/org/apache/samza/test/integration/join/Checker.java index 22f5e87..3012b19 100644 --- a/samza-test/src/main/java/org/apache/samza/test/integration/join/Checker.java +++ b/samza-test/src/main/java/org/apache/samza/test/integration/join/Checker.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.apache.samza.test.integration.join; import org.apache.samza.config.Config; http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/java/org/apache/samza/test/integration/join/Emitter.java ---------------------------------------------------------------------- diff --git a/samza-test/src/main/java/org/apache/samza/test/integration/join/Emitter.java b/samza-test/src/main/java/org/apache/samza/test/integration/join/Emitter.java index 2989ca7..b3be653 100644 --- a/samza-test/src/main/java/org/apache/samza/test/integration/join/Emitter.java +++ b/samza-test/src/main/java/org/apache/samza/test/integration/join/Emitter.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.apache.samza.test.integration.join; import org.apache.samza.config.Config; http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/java/org/apache/samza/test/integration/join/EpochPartitioner.java ---------------------------------------------------------------------- diff --git a/samza-test/src/main/java/org/apache/samza/test/integration/join/EpochPartitioner.java b/samza-test/src/main/java/org/apache/samza/test/integration/join/EpochPartitioner.java index d11d300..670ccf9 100644 --- a/samza-test/src/main/java/org/apache/samza/test/integration/join/EpochPartitioner.java +++ b/samza-test/src/main/java/org/apache/samza/test/integration/join/EpochPartitioner.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.apache.samza.test.integration.join; import kafka.producer.Partitioner; http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/java/org/apache/samza/test/integration/join/Joiner.java ---------------------------------------------------------------------- diff --git a/samza-test/src/main/java/org/apache/samza/test/integration/join/Joiner.java b/samza-test/src/main/java/org/apache/samza/test/integration/join/Joiner.java index ca8fed4..299c1fa 100644 --- a/samza-test/src/main/java/org/apache/samza/test/integration/join/Joiner.java +++ b/samza-test/src/main/java/org/apache/samza/test/integration/join/Joiner.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.apache.samza.test.integration.join; import java.util.HashSet; http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/java/org/apache/samza/test/integration/join/Watcher.java ---------------------------------------------------------------------- diff --git a/samza-test/src/main/java/org/apache/samza/test/integration/join/Watcher.java b/samza-test/src/main/java/org/apache/samza/test/integration/join/Watcher.java index fac4ee1..b3efac5 100644 --- a/samza-test/src/main/java/org/apache/samza/test/integration/join/Watcher.java +++ b/samza-test/src/main/java/org/apache/samza/test/integration/join/Watcher.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.apache.samza.test.integration.join; import java.util.Date; http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/resources/common.properties ---------------------------------------------------------------------- diff --git a/samza-test/src/main/resources/common.properties b/samza-test/src/main/resources/common.properties index 971a219..6e0c061 100644 --- a/samza-test/src/main/resources/common.properties +++ b/samza-test/src/main/resources/common.properties @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# job.factory.class=samza.job.local.LocalJobFactory task.checkpoint.factory=samza.checkpoint.kafka.KafkaCheckpointManagerFactory http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/resources/hello-stateful-world.samsa ---------------------------------------------------------------------- diff --git a/samza-test/src/main/resources/hello-stateful-world.samsa b/samza-test/src/main/resources/hello-stateful-world.samsa index 84325d0..8c2f2e4 100644 --- a/samza-test/src/main/resources/hello-stateful-world.samsa +++ b/samza-test/src/main/resources/hello-stateful-world.samsa @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + # Job job.factory.class=samza.job.local.LocalJobFactory job.name=hello-stateful-world http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/resources/join/checker.samsa ---------------------------------------------------------------------- diff --git a/samza-test/src/main/resources/join/checker.samsa b/samza-test/src/main/resources/join/checker.samsa index e41ffa0..6a6b9cd 100644 --- a/samza-test/src/main/resources/join/checker.samsa +++ b/samza-test/src/main/resources/join/checker.samsa @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + # Job job.name=checker http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/resources/join/emitter.samsa ---------------------------------------------------------------------- diff --git a/samza-test/src/main/resources/join/emitter.samsa b/samza-test/src/main/resources/join/emitter.samsa index 140d13d..5e94322 100644 --- a/samza-test/src/main/resources/join/emitter.samsa +++ b/samza-test/src/main/resources/join/emitter.samsa @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + # Job job.name=emitter http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/resources/join/joiner.samsa ---------------------------------------------------------------------- diff --git a/samza-test/src/main/resources/join/joiner.samsa b/samza-test/src/main/resources/join/joiner.samsa index 27655d8..4ecee2b 100644 --- a/samza-test/src/main/resources/join/joiner.samsa +++ b/samza-test/src/main/resources/join/joiner.samsa @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + # Job job.name=joiner http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/resources/join/watcher.samsa ---------------------------------------------------------------------- diff --git a/samza-test/src/main/resources/join/watcher.samsa b/samza-test/src/main/resources/join/watcher.samsa index a4cc761..025f055 100644 --- a/samza-test/src/main/resources/join/watcher.samsa +++ b/samza-test/src/main/resources/join/watcher.samsa @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + # Job job.name=watcher http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/resources/log4j.xml ---------------------------------------------------------------------- diff --git a/samza-test/src/main/resources/log4j.xml b/samza-test/src/main/resources/log4j.xml index ecaf8a2..2e54cc2 100644 --- a/samza-test/src/main/resources/log4j.xml +++ b/samza-test/src/main/resources/log4j.xml @@ -1,4 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> +<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor + license agreements. See the NOTICE file distributed with this work for additional + information regarding copyright ownership. The ASF licenses this file to + you under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of + the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required + by applicable law or agreed to in writing, software distributed under the + License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + OF ANY KIND, either express or implied. See the License for the specific + language governing permissions and limitations under the License. --> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-test/src/main/resources/perf/counter.samsa ---------------------------------------------------------------------- diff --git a/samza-test/src/main/resources/perf/counter.samsa b/samza-test/src/main/resources/perf/counter.samsa index cf06c9e..6e80a22 100644 --- a/samza-test/src/main/resources/perf/counter.samsa +++ b/samza-test/src/main/resources/perf/counter.samsa @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + # Job job.name=counter-task http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterLifecycle.scala ---------------------------------------------------------------------- diff --git a/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterLifecycle.scala b/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterLifecycle.scala index b24f85a..4ee77e8 100644 --- a/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterLifecycle.scala +++ b/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterLifecycle.scala @@ -47,9 +47,9 @@ class TestSamzaAppMasterLifecycle { this.host = appHostName this.port = appHostPort new RegisterApplicationMasterResponse { - override def setApplicationACLs(map: java.util.Map[ApplicationAccessType, String]) = null + override def setApplicationACLs(map: java.util.Map[ApplicationAccessType, String]):Unit = () override def getApplicationACLs = null - override def setMaximumResourceCapability(r: Resource) = null + override def setMaximumResourceCapability(r: Resource):Unit = () override def getMaximumResourceCapability = new Resource { def getMemory = 512 def getVirtualCores = 2 http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/df6e11af/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterTaskManager.scala ---------------------------------------------------------------------- diff --git a/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterTaskManager.scala b/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterTaskManager.scala index 3064c86..efd330d 100644 --- a/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterTaskManager.scala +++ b/samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterTaskManager.scala @@ -56,7 +56,7 @@ object TestSamzaAppMasterTaskManager { override def setPort(port: Int) = { this.port = port } - override def build() = null + override def build() = () } override def setNodeId(nodeId: NodeId) {} override def getNodeHttpAddress(): String = "" @@ -88,7 +88,7 @@ object TestSamzaAppMasterTaskManager { def resetRelease = release.clear override def registerApplicationMaster(appHostName: String, appHostPort: Int, appTrackingUrl: String): RegisterApplicationMasterResponse = null override def allocate(progressIndicator: Float): AllocateResponse = response - override def unregisterApplicationMaster(appStatus: FinalApplicationStatus, appMessage: String, appTrackingUrl: String) = null + override def unregisterApplicationMaster(appStatus: FinalApplicationStatus, appMessage: String, appTrackingUrl: String) = () override def addContainerRequest(req: ContainerRequest) { requests ::= req } override def removeContainerRequest(req: ContainerRequest) {} override def getClusterNodeCount() = 1
