[GitHub] storm issue #2915: [STORM-3291]Worker can't run as the user who submitted th...

2018-12-18 Thread liu-zhaokun
Github user liu-zhaokun commented on the issue:

https://github.com/apache/storm/pull/2915
  
@revans2 Hi,is my revision consistent with your thoughts? And I also have a 
question,whether we can't use ResourceAwareScheduler if 
supervisor.run.worker.as.user is false?


---


[GitHub] storm pull request #2927: STORM-1307: Port testing4j_test.clj to Java

2018-12-18 Thread srdo
Github user srdo commented on a diff in the pull request:

https://github.com/apache/storm/pull/2927#discussion_r242739488
  
--- Diff: 
storm-core/test/jvm/org/apache/storm/integration/TopologyIntegrationTest.java 
---
@@ -0,0 +1,927 @@
+/*
+ * Copyright 2018 The Apache Software Foundation.
+ *
+ * Licensed 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.storm.integration;
+
+import static org.apache.storm.integration.AssertLoop.assertAcked;
+import static org.apache.storm.integration.AssertLoop.assertFailed;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import org.apache.storm.Config;
+import org.apache.storm.LocalCluster;
+import org.apache.storm.Testing;
+import org.apache.storm.Thrift;
+import org.apache.storm.Thrift.BoltDetails;
+import org.apache.storm.Thrift.SpoutDetails;
+import org.apache.storm.generated.GlobalStreamId;
+import org.apache.storm.generated.Grouping;
+import org.apache.storm.generated.InvalidTopologyException;
+import org.apache.storm.generated.StormTopology;
+import org.apache.storm.generated.SubmitOptions;
+import org.apache.storm.generated.TopologyInitialStatus;
+import org.apache.storm.hooks.BaseTaskHook;
+import org.apache.storm.hooks.info.BoltAckInfo;
+import org.apache.storm.hooks.info.BoltExecuteInfo;
+import org.apache.storm.hooks.info.BoltFailInfo;
+import org.apache.storm.hooks.info.EmitInfo;
+import org.apache.storm.spout.SpoutOutputCollector;
+import org.apache.storm.task.OutputCollector;
+import org.apache.storm.task.TopologyContext;
+import org.apache.storm.testing.AckFailMapTracker;
+import org.apache.storm.testing.CompleteTopologyParam;
+import org.apache.storm.testing.FeederSpout;
+import org.apache.storm.testing.FixedTuple;
+import org.apache.storm.testing.IntegrationTest;
+import org.apache.storm.testing.MockedSources;
+import org.apache.storm.testing.TestAggregatesCounter;
+import org.apache.storm.testing.TestConfBolt;
+import org.apache.storm.testing.TestGlobalCount;
+import org.apache.storm.testing.TestPlannerSpout;
+import org.apache.storm.testing.TestWordCounter;
+import org.apache.storm.testing.TestWordSpout;
+import org.apache.storm.testing.TrackedTopology;
+import org.apache.storm.topology.OutputFieldsDeclarer;
+import org.apache.storm.topology.TopologyBuilder;
+import org.apache.storm.topology.base.BaseRichBolt;
+import org.apache.storm.topology.base.BaseRichSpout;
+import org.apache.storm.tuple.Fields;
+import org.apache.storm.tuple.Tuple;
+import org.apache.storm.tuple.Values;
+import org.apache.storm.utils.Utils;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+@IntegrationTest
+public class TopologyIntegrationTest {
+
+@ParameterizedTest
+@ValueSource(strings = {"true", "false"})
+public void testBasicTopology(boolean useLocalMessaging) throws 
Exception {
+try (LocalCluster cluster = new LocalCluster.Builder()
+.withSimulatedTime()
+.withSupervisors(4)
+
.withDaemonConf(Collections.singletonMap(Config.STORM_LOCAL_MODE_ZMQ, 
!useLocalMessaging))
+.build()) {
+Map spoutMap = 
Collections.singletonMap("1", Thrift.prepareSpoutDetails(new 
TestWordSpout(true), 3));
+Map boltMap = new HashMap<>();
+boltMap.put("2",
+Thrift.prepareBoltDetails(
+Collections.singletonMap(
+Utils.getGlobalStreamId("1", null),
+
Thrift.prepareFieldsGrouping(Collections.singletonList("word"))),
+new TestWordCounter(), 4));
+boltMap.

[GitHub] storm pull request #2927: STORM-1307: Port testing4j_test.clj to Java

2018-12-18 Thread srdo
Github user srdo commented on a diff in the pull request:

https://github.com/apache/storm/pull/2927#discussion_r242699069
  
--- Diff: 
storm-core/test/jvm/org/apache/storm/integration/TopologyIntegrationTest.java 
---
@@ -0,0 +1,927 @@
+/*
+ * Copyright 2018 The Apache Software Foundation.
+ *
+ * Licensed 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.storm.integration;
+
+import static org.apache.storm.integration.AssertLoop.assertAcked;
+import static org.apache.storm.integration.AssertLoop.assertFailed;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import org.apache.storm.Config;
+import org.apache.storm.LocalCluster;
+import org.apache.storm.Testing;
+import org.apache.storm.Thrift;
+import org.apache.storm.Thrift.BoltDetails;
+import org.apache.storm.Thrift.SpoutDetails;
+import org.apache.storm.generated.GlobalStreamId;
+import org.apache.storm.generated.Grouping;
+import org.apache.storm.generated.InvalidTopologyException;
+import org.apache.storm.generated.StormTopology;
+import org.apache.storm.generated.SubmitOptions;
+import org.apache.storm.generated.TopologyInitialStatus;
+import org.apache.storm.hooks.BaseTaskHook;
+import org.apache.storm.hooks.info.BoltAckInfo;
+import org.apache.storm.hooks.info.BoltExecuteInfo;
+import org.apache.storm.hooks.info.BoltFailInfo;
+import org.apache.storm.hooks.info.EmitInfo;
+import org.apache.storm.spout.SpoutOutputCollector;
+import org.apache.storm.task.OutputCollector;
+import org.apache.storm.task.TopologyContext;
+import org.apache.storm.testing.AckFailMapTracker;
+import org.apache.storm.testing.CompleteTopologyParam;
+import org.apache.storm.testing.FeederSpout;
+import org.apache.storm.testing.FixedTuple;
+import org.apache.storm.testing.IntegrationTest;
+import org.apache.storm.testing.MockedSources;
+import org.apache.storm.testing.TestAggregatesCounter;
+import org.apache.storm.testing.TestConfBolt;
+import org.apache.storm.testing.TestGlobalCount;
+import org.apache.storm.testing.TestPlannerSpout;
+import org.apache.storm.testing.TestWordCounter;
+import org.apache.storm.testing.TestWordSpout;
+import org.apache.storm.testing.TrackedTopology;
+import org.apache.storm.topology.OutputFieldsDeclarer;
+import org.apache.storm.topology.TopologyBuilder;
+import org.apache.storm.topology.base.BaseRichBolt;
+import org.apache.storm.topology.base.BaseRichSpout;
+import org.apache.storm.tuple.Fields;
+import org.apache.storm.tuple.Tuple;
+import org.apache.storm.tuple.Values;
+import org.apache.storm.utils.Utils;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+@IntegrationTest
+public class TopologyIntegrationTest {
+
+@ParameterizedTest
+@ValueSource(strings = {"true", "false"})
+public void testBasicTopology(boolean useLocalMessaging) throws 
Exception {
+try (LocalCluster cluster = new LocalCluster.Builder()
+.withSimulatedTime()
+.withSupervisors(4)
+
.withDaemonConf(Collections.singletonMap(Config.STORM_LOCAL_MODE_ZMQ, 
!useLocalMessaging))
+.build()) {
+Map spoutMap = 
Collections.singletonMap("1", Thrift.prepareSpoutDetails(new 
TestWordSpout(true), 3));
+Map boltMap = new HashMap<>();
+boltMap.put("2",
+Thrift.prepareBoltDetails(
+Collections.singletonMap(
+Utils.getGlobalStreamId("1", null),
+
Thrift.prepareFieldsGrouping(Collections.singletonList("word"))),
+new TestWordCounter(), 4));
+boltMap.

[GitHub] storm pull request #2927: STORM-1307: Port testing4j_test.clj to Java

2018-12-18 Thread srdo
Github user srdo commented on a diff in the pull request:

https://github.com/apache/storm/pull/2927#discussion_r242698501
  
--- Diff: 
storm-core/test/jvm/org/apache/storm/integration/TopologyIntegrationTest.java 
---
@@ -0,0 +1,927 @@
+/*
+ * Copyright 2018 The Apache Software Foundation.
+ *
+ * Licensed 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.storm.integration;
+
+import static org.apache.storm.integration.AssertLoop.assertAcked;
+import static org.apache.storm.integration.AssertLoop.assertFailed;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import org.apache.storm.Config;
+import org.apache.storm.LocalCluster;
+import org.apache.storm.Testing;
+import org.apache.storm.Thrift;
+import org.apache.storm.Thrift.BoltDetails;
+import org.apache.storm.Thrift.SpoutDetails;
+import org.apache.storm.generated.GlobalStreamId;
+import org.apache.storm.generated.Grouping;
+import org.apache.storm.generated.InvalidTopologyException;
+import org.apache.storm.generated.StormTopology;
+import org.apache.storm.generated.SubmitOptions;
+import org.apache.storm.generated.TopologyInitialStatus;
+import org.apache.storm.hooks.BaseTaskHook;
+import org.apache.storm.hooks.info.BoltAckInfo;
+import org.apache.storm.hooks.info.BoltExecuteInfo;
+import org.apache.storm.hooks.info.BoltFailInfo;
+import org.apache.storm.hooks.info.EmitInfo;
+import org.apache.storm.spout.SpoutOutputCollector;
+import org.apache.storm.task.OutputCollector;
+import org.apache.storm.task.TopologyContext;
+import org.apache.storm.testing.AckFailMapTracker;
+import org.apache.storm.testing.CompleteTopologyParam;
+import org.apache.storm.testing.FeederSpout;
+import org.apache.storm.testing.FixedTuple;
+import org.apache.storm.testing.IntegrationTest;
+import org.apache.storm.testing.MockedSources;
+import org.apache.storm.testing.TestAggregatesCounter;
+import org.apache.storm.testing.TestConfBolt;
+import org.apache.storm.testing.TestGlobalCount;
+import org.apache.storm.testing.TestPlannerSpout;
+import org.apache.storm.testing.TestWordCounter;
+import org.apache.storm.testing.TestWordSpout;
+import org.apache.storm.testing.TrackedTopology;
+import org.apache.storm.topology.OutputFieldsDeclarer;
+import org.apache.storm.topology.TopologyBuilder;
+import org.apache.storm.topology.base.BaseRichBolt;
+import org.apache.storm.topology.base.BaseRichSpout;
+import org.apache.storm.tuple.Fields;
+import org.apache.storm.tuple.Tuple;
+import org.apache.storm.tuple.Values;
+import org.apache.storm.utils.Utils;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+@IntegrationTest
+public class TopologyIntegrationTest {
+
+@ParameterizedTest
+@ValueSource(strings = {"true", "false"})
+public void testBasicTopology(boolean useLocalMessaging) throws 
Exception {
+try (LocalCluster cluster = new LocalCluster.Builder()
+.withSimulatedTime()
+.withSupervisors(4)
+
.withDaemonConf(Collections.singletonMap(Config.STORM_LOCAL_MODE_ZMQ, 
!useLocalMessaging))
+.build()) {
+Map spoutMap = 
Collections.singletonMap("1", Thrift.prepareSpoutDetails(new 
TestWordSpout(true), 3));
+Map boltMap = new HashMap<>();
+boltMap.put("2",
+Thrift.prepareBoltDetails(
+Collections.singletonMap(
+Utils.getGlobalStreamId("1", null),
+
Thrift.prepareFieldsGrouping(Collections.singletonList("word"))),
+new TestWordCounter(), 4));
+boltMap.

[GitHub] storm issue #2908: STORM-3276: Updated Flux to deal with storm local correct...

2018-12-18 Thread srdo
Github user srdo commented on the issue:

https://github.com/apache/storm/pull/2908
  
+1.

I'm still wondering why we need to preserve command line options here 
https://github.com/apache/storm/pull/2908#discussion_r236358832 but I think 
it's fine either way.


---


[GitHub] storm pull request #2927: STORM-1307: Port testing4j_test.clj to Java

2018-12-18 Thread revans2
Github user revans2 commented on a diff in the pull request:

https://github.com/apache/storm/pull/2927#discussion_r242663110
  
--- Diff: 
storm-core/test/jvm/org/apache/storm/integration/TopologyIntegrationTest.java 
---
@@ -0,0 +1,927 @@
+/*
+ * Copyright 2018 The Apache Software Foundation.
+ *
+ * Licensed 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.storm.integration;
+
+import static org.apache.storm.integration.AssertLoop.assertAcked;
+import static org.apache.storm.integration.AssertLoop.assertFailed;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import org.apache.storm.Config;
+import org.apache.storm.LocalCluster;
+import org.apache.storm.Testing;
+import org.apache.storm.Thrift;
+import org.apache.storm.Thrift.BoltDetails;
+import org.apache.storm.Thrift.SpoutDetails;
+import org.apache.storm.generated.GlobalStreamId;
+import org.apache.storm.generated.Grouping;
+import org.apache.storm.generated.InvalidTopologyException;
+import org.apache.storm.generated.StormTopology;
+import org.apache.storm.generated.SubmitOptions;
+import org.apache.storm.generated.TopologyInitialStatus;
+import org.apache.storm.hooks.BaseTaskHook;
+import org.apache.storm.hooks.info.BoltAckInfo;
+import org.apache.storm.hooks.info.BoltExecuteInfo;
+import org.apache.storm.hooks.info.BoltFailInfo;
+import org.apache.storm.hooks.info.EmitInfo;
+import org.apache.storm.spout.SpoutOutputCollector;
+import org.apache.storm.task.OutputCollector;
+import org.apache.storm.task.TopologyContext;
+import org.apache.storm.testing.AckFailMapTracker;
+import org.apache.storm.testing.CompleteTopologyParam;
+import org.apache.storm.testing.FeederSpout;
+import org.apache.storm.testing.FixedTuple;
+import org.apache.storm.testing.IntegrationTest;
+import org.apache.storm.testing.MockedSources;
+import org.apache.storm.testing.TestAggregatesCounter;
+import org.apache.storm.testing.TestConfBolt;
+import org.apache.storm.testing.TestGlobalCount;
+import org.apache.storm.testing.TestPlannerSpout;
+import org.apache.storm.testing.TestWordCounter;
+import org.apache.storm.testing.TestWordSpout;
+import org.apache.storm.testing.TrackedTopology;
+import org.apache.storm.topology.OutputFieldsDeclarer;
+import org.apache.storm.topology.TopologyBuilder;
+import org.apache.storm.topology.base.BaseRichBolt;
+import org.apache.storm.topology.base.BaseRichSpout;
+import org.apache.storm.tuple.Fields;
+import org.apache.storm.tuple.Tuple;
+import org.apache.storm.tuple.Values;
+import org.apache.storm.utils.Utils;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+@IntegrationTest
+public class TopologyIntegrationTest {
+
+@ParameterizedTest
+@ValueSource(strings = {"true", "false"})
+public void testBasicTopology(boolean useLocalMessaging) throws 
Exception {
+try (LocalCluster cluster = new LocalCluster.Builder()
+.withSimulatedTime()
+.withSupervisors(4)
+
.withDaemonConf(Collections.singletonMap(Config.STORM_LOCAL_MODE_ZMQ, 
!useLocalMessaging))
+.build()) {
+Map spoutMap = 
Collections.singletonMap("1", Thrift.prepareSpoutDetails(new 
TestWordSpout(true), 3));
+Map boltMap = new HashMap<>();
+boltMap.put("2",
+Thrift.prepareBoltDetails(
+Collections.singletonMap(
+Utils.getGlobalStreamId("1", null),
+
Thrift.prepareFieldsGrouping(Collections.singletonList("word"))),
+new TestWordCounter(), 4));
+boltM

[GitHub] storm pull request #2927: STORM-1307: Port testing4j_test.clj to Java

2018-12-18 Thread revans2
Github user revans2 commented on a diff in the pull request:

https://github.com/apache/storm/pull/2927#discussion_r242661816
  
--- Diff: 
storm-core/test/jvm/org/apache/storm/integration/TopologyIntegrationTest.java 
---
@@ -0,0 +1,927 @@
+/*
+ * Copyright 2018 The Apache Software Foundation.
+ *
+ * Licensed 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.storm.integration;
+
+import static org.apache.storm.integration.AssertLoop.assertAcked;
+import static org.apache.storm.integration.AssertLoop.assertFailed;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import org.apache.storm.Config;
+import org.apache.storm.LocalCluster;
+import org.apache.storm.Testing;
+import org.apache.storm.Thrift;
+import org.apache.storm.Thrift.BoltDetails;
+import org.apache.storm.Thrift.SpoutDetails;
+import org.apache.storm.generated.GlobalStreamId;
+import org.apache.storm.generated.Grouping;
+import org.apache.storm.generated.InvalidTopologyException;
+import org.apache.storm.generated.StormTopology;
+import org.apache.storm.generated.SubmitOptions;
+import org.apache.storm.generated.TopologyInitialStatus;
+import org.apache.storm.hooks.BaseTaskHook;
+import org.apache.storm.hooks.info.BoltAckInfo;
+import org.apache.storm.hooks.info.BoltExecuteInfo;
+import org.apache.storm.hooks.info.BoltFailInfo;
+import org.apache.storm.hooks.info.EmitInfo;
+import org.apache.storm.spout.SpoutOutputCollector;
+import org.apache.storm.task.OutputCollector;
+import org.apache.storm.task.TopologyContext;
+import org.apache.storm.testing.AckFailMapTracker;
+import org.apache.storm.testing.CompleteTopologyParam;
+import org.apache.storm.testing.FeederSpout;
+import org.apache.storm.testing.FixedTuple;
+import org.apache.storm.testing.IntegrationTest;
+import org.apache.storm.testing.MockedSources;
+import org.apache.storm.testing.TestAggregatesCounter;
+import org.apache.storm.testing.TestConfBolt;
+import org.apache.storm.testing.TestGlobalCount;
+import org.apache.storm.testing.TestPlannerSpout;
+import org.apache.storm.testing.TestWordCounter;
+import org.apache.storm.testing.TestWordSpout;
+import org.apache.storm.testing.TrackedTopology;
+import org.apache.storm.topology.OutputFieldsDeclarer;
+import org.apache.storm.topology.TopologyBuilder;
+import org.apache.storm.topology.base.BaseRichBolt;
+import org.apache.storm.topology.base.BaseRichSpout;
+import org.apache.storm.tuple.Fields;
+import org.apache.storm.tuple.Tuple;
+import org.apache.storm.tuple.Values;
+import org.apache.storm.utils.Utils;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+@IntegrationTest
+public class TopologyIntegrationTest {
+
+@ParameterizedTest
+@ValueSource(strings = {"true", "false"})
+public void testBasicTopology(boolean useLocalMessaging) throws 
Exception {
+try (LocalCluster cluster = new LocalCluster.Builder()
+.withSimulatedTime()
+.withSupervisors(4)
+
.withDaemonConf(Collections.singletonMap(Config.STORM_LOCAL_MODE_ZMQ, 
!useLocalMessaging))
+.build()) {
+Map spoutMap = 
Collections.singletonMap("1", Thrift.prepareSpoutDetails(new 
TestWordSpout(true), 3));
+Map boltMap = new HashMap<>();
+boltMap.put("2",
+Thrift.prepareBoltDetails(
+Collections.singletonMap(
+Utils.getGlobalStreamId("1", null),
+
Thrift.prepareFieldsGrouping(Collections.singletonList("word"))),
+new TestWordCounter(), 4));
+boltM

[GitHub] storm issue #2908: STORM-3276: Updated Flux to deal with storm local correct...

2018-12-18 Thread revans2
Github user revans2 commented on the issue:

https://github.com/apache/storm/pull/2908
  
@srdo @kishorvpatil @jnioche 

Sorry this has taken so long.  I just rebased/squashed and @srdo I 
addressed your nit.  Please take another look.


---


[GitHub] storm pull request #2918: STORM-3295 allow blacklist scheduling to function ...

2018-12-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/storm/pull/2918


---


[GitHub] storm pull request #2926: STORM-3303 adjust some logging priorities, log top...

2018-12-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/storm/pull/2926


---


[GitHub] storm pull request #2925: STORM-3302: Ensures we close streams to HDFS

2018-12-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/storm/pull/2925


---


[GitHub] storm issue #2915: [STORM-3291]Worker can't run as the user who submitted th...

2018-12-18 Thread revans2
Github user revans2 commented on the issue:

https://github.com/apache/storm/pull/2915
  
@liu-zhaokun Currently the only way that the user name is transmitted from 
the client to the server is through authentication because authentication is 
secure and we didn't want to accidentally enable a false sense of security when 
auth is disabled.  We set the owner of the topology to the name of the user 
running nimbus because that is who the topology was truly running as.

If you really want to make this happen you will need to do one of two 
things.  Either 
1. install some type of authentication, could be digest which would not be 
too difficult to get working, or 
2. modify the clients to set a config with the user they want the topology 
to run as and then have nimbus honor it.

If you do the second option I would want a config to enable this new 
behavior. Something like

```java
/**
 * If true nimbus will honor the config user.name from the topology 
conf, and set it as the
 * owner of the topology.  This only has an impact when authentication 
is disabled.  Be 
 * very careful when using this when supervisor.run.worker.as.user is 
enabled as any user
 *  can become nearly any user on the box.
 */
@isBoolean
 public static final String NIMBUS_USE_UNSAFE_USER_CONFIG = 
"nimbus.use.unsafe.user.config";
```

Just so you know `user.name` is the name of the system property that java 
sets with the name of the unix user your java process is running as, but it is 
not safe to assume it is always correct because it can be modified/overwritten.


---


[GitHub] storm pull request #2928: STORM-3270: Build Storm with Java 11, excluding so...

2018-12-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/storm/pull/2928


---


[GitHub] storm pull request #2921: STORM-3300: Fix NPE in Acker that could occur if s...

2018-12-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/storm/pull/2921


---