You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2016/01/11 16:34:49 UTC
[1/8] storm git commit: exhibitor support
Repository: storm
Updated Branches:
refs/heads/master 405b4beaf -> 89c0f84ac
exhibitor support
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/06a47a9a
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/06a47a9a
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/06a47a9a
Branch: refs/heads/master
Commit: 06a47a9a9676aae7f34f6e5d14ef29fd2c59b422
Parents: cb1018d
Author: Aaron Dixon <at...@gmail.com>
Authored: Sun Feb 15 11:42:45 2015 -0600
Committer: Aaron Dixon <at...@gmail.com>
Committed: Tue Jan 5 16:36:34 2016 -0600
----------------------------------------------------------------------
storm-core/src/jvm/backtype/storm/Config.java | 43 +++++++++++++
.../src/jvm/backtype/storm/utils/Utils.java | 66 ++++++++++++++++++--
2 files changed, 104 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/06a47a9a/storm-core/src/jvm/backtype/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/Config.java b/storm-core/src/jvm/backtype/storm/Config.java
index 9db9977..dd488c4 100644
--- a/storm-core/src/jvm/backtype/storm/Config.java
+++ b/storm-core/src/jvm/backtype/storm/Config.java
@@ -153,6 +153,19 @@ public class Config extends HashMap<String, Object> {
public static final String STORM_ZOOKEEPER_PORT = "storm.zookeeper.port";
/**
+ * A list of hosts of Exhibitor servers used to discover/maintain connection to ZooKeeper cluster.
+ * Any configured ZooKeeper servers will be used for the curator/exhibitor backup connection string.
+ */
+ public static final String STORM_EXHIBITOR_SERVERS = "storm.exhibitor.servers";
+ public static final Object STORM_EXHIBITOR_SERVERS_SCHEMA = ConfigValidation.StringsValidator;
+
+ /**
+ * The port Storm will use to connect to each of the exhibitor servers.
+ */
+ public static final String STORM_EXHIBITOR_PORT = "storm.exhibitor.port";
+ public static final Object STORM_EXHIBITOR_PORT_SCHEMA = ConfigValidation.IntegerValidator;
+
+ /**
* A directory on the local filesystem used by Storm for any local
* filesystem usage it needs. The directory must exist and the Storm daemons must
* have permission to read/write from this location.
@@ -342,6 +355,36 @@ public class Config extends HashMap<String, Object> {
@isString
public static final String STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD="storm.zookeeper.topology.auth.payload";
+ /*
+ * How often to poll Exhibitor cluster in millis.
+ */
+ public static final String STORM_EXHIBITOR_URIPATH="storm.exhibitor.poll.uripath";
+ public static final Object STORM_EXHIBITOR_URIPATH_SCHEMA = String.class;
+
+ /**
+ * How often to poll Exhibitor cluster in millis.
+ */
+ public static final String STORM_EXHIBITOR_POLL="storm.exhibitor.poll.millis";
+ public static final Object STORM_EXHIBITOR_POLL_SCHEMA = ConfigValidation.IntegerValidator;
+
+ /**
+ * The number of times to retry an Exhibitor operation.
+ */
+ public static final String STORM_EXHIBITOR_RETRY_TIMES="storm.exhibitor.retry.times";
+ public static final Object STORM_EXHIBITOR_RETRY_TIMES_SCHEMA = ConfigValidation.IntegerValidator;
+
+ /**
+ * The interval between retries of an Exhibitor operation.
+ */
+ public static final String STORM_EXHIBITOR_RETRY_INTERVAL="storm.exhibitor.retry.interval";
+ public static final Object STORM_EXHIBITOR_RETRY_INTERVAL_SCHEMA = ConfigValidation.IntegerValidator;
+
+ /**
+ * The ceiling of the interval between retries of an Exhibitor operation.
+ */
+ public static final String STORM_EXHIBITOR_RETRY_INTERVAL_CEILING="storm.exhibitor.retry.intervalceiling.millis";
+ public static final Object STORM_EXHIBITOR_RETRY_INTERVAL_CEILING_SCHEMA = ConfigValidation.IntegerValidator;
+
/**
* The id assigned to a running topology. The id is the storm name with a unique nonce appended.
*/
http://git-wip-us.apache.org/repos/asf/storm/blob/06a47a9a/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index 0d9140f..2296209 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -35,6 +35,25 @@ import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.io.input.ClassLoaderObjectInputStream;
import org.apache.commons.lang.StringUtils;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channels;
+import java.nio.channels.WritableByteChannel;
+import java.util.*;
+
+import org.apache.curator.ensemble.exhibitor.DefaultExhibitorRestClient;
+import org.apache.curator.ensemble.exhibitor.ExhibitorEnsembleProvider;
+import org.apache.curator.ensemble.exhibitor.Exhibitors;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.thrift.TBase;
@@ -621,6 +640,22 @@ public class Utils {
throw new IllegalArgumentException("Could not find component with id " + id);
}
+ public static List<String> getStrings(final Object o) {
+ if (o == null) {
+ return Collections.emptyList();
+ } else if (o instanceof String) {
+ return new ArrayList<String>() {{ add((String) o); }};
+ } else if (o instanceof Collection) {
+ List<String> answer = new ArrayList<String>();
+ for (Object v : (Collection) o) {
+ answer.add(v.toString());
+ }
+ return answer;
+ } else {
+ throw new IllegalArgumentException("Don't know how to convert to string list");
+ }
+ }
+
public static Integer getInt(Object o) {
Integer result = getInt(o, null);
if (null == result) {
@@ -982,12 +1017,33 @@ public class Utils {
return builder.build();
}
- protected static void setupBuilder(CuratorFrameworkFactory.Builder builder, String zkStr, Map conf, ZookeeperAuthInfo auth)
+ protected static void setupBuilder(CuratorFrameworkFactory.Builder builder, final String zkStr, Map conf, ZookeeperAuthInfo auth)
{
- builder.connectString(zkStr)
- .connectionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT)))
- .sessionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)))
- .retryPolicy(new StormBoundedExponentialBackoffRetry(
+ List<String> exhibitorServers = getStrings(conf.get(Config.STORM_EXHIBITOR_SERVERS));
+ if (!exhibitorServers.isEmpty()) {
+ // use exhibitor servers
+ builder.ensembleProvider(new ExhibitorEnsembleProvider(
+ new Exhibitors(exhibitorServers, Utils.getInt(conf.get(Config.STORM_EXHIBITOR_PORT), 8080),
+ new Exhibitors.BackupConnectionStringProvider() {
+ @Override
+ public String getBackupConnectionString() throws Exception {
+ // use zk servers as backup if they exist
+ return zkStr;
+ }}),
+ new DefaultExhibitorRestClient(),
+ (String) Utils.get(conf, Config.STORM_EXHIBITOR_URIPATH, "/exhibitor/v1/cluster/list"),
+ Utils.getInt(conf.get(Config.STORM_EXHIBITOR_POLL)),
+ new StormBoundedExponentialBackoffRetry(
+ Utils.getInt(conf.get(Config.STORM_EXHIBITOR_RETRY_INTERVAL)),
+ Utils.getInt(conf.get(Config.STORM_EXHIBITOR_RETRY_INTERVAL_CEILING)),
+ Utils.getInt(conf.get(Config.STORM_EXHIBITOR_RETRY_TIMES)))));
+ } else {
+ builder.connectString(zkStr);
+ }
+ builder
+ .connectionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT)))
+ .sessionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)))
+ .retryPolicy(new StormBoundedExponentialBackoffRetry(
Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL)),
Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL_CEILING)),
Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_TIMES))));
[7/8] storm git commit: Merge branch 'exhibitor-support' of
https://github.com/atdixon/storm into STORM-702
Posted by bo...@apache.org.
Merge branch 'exhibitor-support' of https://github.com/atdixon/storm into STORM-702
STORM-702: Exhibitor support
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/4eee03f9
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/4eee03f9
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/4eee03f9
Branch: refs/heads/master
Commit: 4eee03f9a2e28ffcb7667de9b864f4844e67b5a6
Parents: 405b4be ab769cb
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Mon Jan 11 09:20:09 2016 -0600
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Mon Jan 11 09:20:09 2016 -0600
----------------------------------------------------------------------
conf/defaults.yaml | 2 +
storm-core/src/jvm/backtype/storm/Config.java | 44 ++++++
.../src/jvm/backtype/storm/utils/Utils.java | 137 +++++++++++++------
3 files changed, 142 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
[6/8] storm git commit: per cr,
answering mutable empty list instead of immutable in
Utils.getStrings()
Posted by bo...@apache.org.
per cr, answering mutable empty list instead of immutable in Utils.getStrings()
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/ab769cba
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/ab769cba
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/ab769cba
Branch: refs/heads/master
Commit: ab769cba028b5db4eb00540da6254bb67be216d6
Parents: c9cc96a
Author: Aaron Dixon <at...@gmail.com>
Authored: Tue Jan 5 16:59:45 2016 -0600
Committer: Aaron Dixon <at...@gmail.com>
Committed: Tue Jan 5 16:59:45 2016 -0600
----------------------------------------------------------------------
storm-core/src/jvm/backtype/storm/utils/Utils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/ab769cba/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index eaa6e85..890451e 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -634,7 +634,7 @@ public class Utils {
public static List<String> getStrings(final Object o) {
if (o == null) {
- return Collections.emptyList();
+ return new ArrayList<String>();
} else if (o instanceof String) {
return new ArrayList<String>() {{ add((String) o); }};
} else if (o instanceof Collection) {
[3/8] storm git commit: moved exhibitor in-code defaults to
defaults.yaml
Posted by bo...@apache.org.
moved exhibitor in-code defaults to defaults.yaml
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/c53ae51e
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/c53ae51e
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/c53ae51e
Branch: refs/heads/master
Commit: c53ae51e4511e940fe37fa778bafe7d122371bd8
Parents: 29bf22a
Author: Aaron Dixon <at...@gmail.com>
Authored: Tue Mar 17 15:11:04 2015 -0500
Committer: Aaron Dixon <at...@gmail.com>
Committed: Tue Jan 5 16:39:37 2016 -0600
----------------------------------------------------------------------
conf/defaults.yaml | 2 ++
.../src/jvm/backtype/storm/utils/Utils.java | 35 ++++++++++++++++----
2 files changed, 30 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/c53ae51e/conf/defaults.yaml
----------------------------------------------------------------------
diff --git a/conf/defaults.yaml b/conf/defaults.yaml
index fb87e8e..b5c8b47 100644
--- a/conf/defaults.yaml
+++ b/conf/defaults.yaml
@@ -35,6 +35,8 @@ storm.zookeeper.retry.interval: 1000
storm.zookeeper.retry.intervalceiling.millis: 30000
storm.zookeeper.auth.user: null
storm.zookeeper.auth.password: null
+storm.exhibitor.port: 8080
+storm.exhibitor.poll.uripath: "/exhibitor/v1/cluster/list"
storm.cluster.mode: "distributed" # can be distributed or local
storm.local.mode.zmq: false
storm.thrift.transport: "backtype.storm.security.auth.SimpleTransportPlugin"
http://git-wip-us.apache.org/repos/asf/storm/blob/c53ae51e/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index 4d2ecf1..f7c6d5a 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -35,21 +35,34 @@ import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.io.input.ClassLoaderObjectInputStream;
import org.apache.commons.lang.StringUtils;
+import org.apache.curator.ensemble.exhibitor.DefaultExhibitorRestClient;
+import org.apache.curator.ensemble.exhibitor.ExhibitorEnsembleProvider;
+import org.apache.curator.ensemble.exhibitor.Exhibitors;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.thrift.TException;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
+import org.apache.zookeeper.data.Id;
+import org.json.simple.JSONValue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.yaml.snakeyaml.Yaml;
+import org.yaml.snakeyaml.constructor.SafeConstructor;
+
import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.nio.channels.WritableByteChannel;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
@@ -58,6 +71,7 @@ import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.UUID;
+
import java.util.Collection;
import java.util.Collections;
@@ -666,6 +680,13 @@ public class Utils {
}
}
+ public static String getString(Object o) {
+ if (null == o) {
+ throw new IllegalArgumentException("Don't know how to convert null to String");
+ }
+ return o.toString();
+ }
+
public static Integer getInt(Object o) {
Integer result = getInt(o, null);
if (null == result) {
@@ -1016,7 +1037,7 @@ public class Utils {
public static CuratorFramework newCurator(Map conf, List<String> servers, Object port, String root, ZookeeperAuthInfo auth) {
List<String> serverPorts = new ArrayList<String>();
- for (String zkServer : (List<String>) servers) {
+ for (String zkServer: servers) {
serverPorts.add(zkServer + ":" + Utils.getInt(port));
}
String zkStr = StringUtils.join(serverPorts, ",") + root;
@@ -1033,7 +1054,7 @@ public class Utils {
if (!exhibitorServers.isEmpty()) {
// use exhibitor servers
builder.ensembleProvider(new ExhibitorEnsembleProvider(
- new Exhibitors(exhibitorServers, Utils.getInt(conf.get(Config.STORM_EXHIBITOR_PORT), 8080),
+ new Exhibitors(exhibitorServers, Utils.getInt(conf.get(Config.STORM_EXHIBITOR_PORT)),
new Exhibitors.BackupConnectionStringProvider() {
@Override
public String getBackupConnectionString() throws Exception {
@@ -1041,7 +1062,7 @@ public class Utils {
return zkStr;
}}),
new DefaultExhibitorRestClient(),
- (String) Utils.get(conf, Config.STORM_EXHIBITOR_URIPATH, "/exhibitor/v1/cluster/list"),
+ Utils.getString(conf.get(Config.STORM_EXHIBITOR_URIPATH)),
Utils.getInt(conf.get(Config.STORM_EXHIBITOR_POLL)),
new StormBoundedExponentialBackoffRetry(
Utils.getInt(conf.get(Config.STORM_EXHIBITOR_RETRY_INTERVAL)),
[5/8] storm git commit: fixes after rebase
Posted by bo...@apache.org.
fixes after rebase
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/c9cc96a1
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/c9cc96a1
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/c9cc96a1
Branch: refs/heads/master
Commit: c9cc96a1766ae5ff423a32886c3ce58075816671
Parents: 2e88a2f
Author: Aaron Dixon <at...@gmail.com>
Authored: Tue Jan 5 16:57:30 2016 -0600
Committer: Aaron Dixon <at...@gmail.com>
Committed: Tue Jan 5 16:57:30 2016 -0600
----------------------------------------------------------------------
storm-core/src/jvm/backtype/storm/Config.java | 15 +-
.../src/jvm/backtype/storm/utils/Utils.java | 139 ++++++-------------
2 files changed, 48 insertions(+), 106 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/c9cc96a1/storm-core/src/jvm/backtype/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/Config.java b/storm-core/src/jvm/backtype/storm/Config.java
index dd488c4..932d2a7 100644
--- a/storm-core/src/jvm/backtype/storm/Config.java
+++ b/storm-core/src/jvm/backtype/storm/Config.java
@@ -156,14 +156,15 @@ public class Config extends HashMap<String, Object> {
* A list of hosts of Exhibitor servers used to discover/maintain connection to ZooKeeper cluster.
* Any configured ZooKeeper servers will be used for the curator/exhibitor backup connection string.
*/
+ @isStringList
public static final String STORM_EXHIBITOR_SERVERS = "storm.exhibitor.servers";
- public static final Object STORM_EXHIBITOR_SERVERS_SCHEMA = ConfigValidation.StringsValidator;
/**
* The port Storm will use to connect to each of the exhibitor servers.
*/
+ @isInteger
+ @isPositiveNumber
public static final String STORM_EXHIBITOR_PORT = "storm.exhibitor.port";
- public static final Object STORM_EXHIBITOR_PORT_SCHEMA = ConfigValidation.IntegerValidator;
/**
* A directory on the local filesystem used by Storm for any local
@@ -358,32 +359,32 @@ public class Config extends HashMap<String, Object> {
/*
* How often to poll Exhibitor cluster in millis.
*/
+ @isString
public static final String STORM_EXHIBITOR_URIPATH="storm.exhibitor.poll.uripath";
- public static final Object STORM_EXHIBITOR_URIPATH_SCHEMA = String.class;
/**
* How often to poll Exhibitor cluster in millis.
*/
+ @isInteger
public static final String STORM_EXHIBITOR_POLL="storm.exhibitor.poll.millis";
- public static final Object STORM_EXHIBITOR_POLL_SCHEMA = ConfigValidation.IntegerValidator;
/**
* The number of times to retry an Exhibitor operation.
*/
+ @isInteger
public static final String STORM_EXHIBITOR_RETRY_TIMES="storm.exhibitor.retry.times";
- public static final Object STORM_EXHIBITOR_RETRY_TIMES_SCHEMA = ConfigValidation.IntegerValidator;
/**
* The interval between retries of an Exhibitor operation.
*/
+ @isInteger
public static final String STORM_EXHIBITOR_RETRY_INTERVAL="storm.exhibitor.retry.interval";
- public static final Object STORM_EXHIBITOR_RETRY_INTERVAL_SCHEMA = ConfigValidation.IntegerValidator;
/**
* The ceiling of the interval between retries of an Exhibitor operation.
*/
+ @isInteger
public static final String STORM_EXHIBITOR_RETRY_INTERVAL_CEILING="storm.exhibitor.retry.intervalceiling.millis";
- public static final Object STORM_EXHIBITOR_RETRY_INTERVAL_CEILING_SCHEMA = ConfigValidation.IntegerValidator;
/**
* The id assigned to a running topology. The id is the storm name with a unique nonce appended.
http://git-wip-us.apache.org/repos/asf/storm/blob/c9cc96a1/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index 2af8616..eaa6e85 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -23,7 +23,18 @@ import backtype.storm.blobstore.BlobStoreAclHandler;
import backtype.storm.blobstore.ClientBlobStore;
import backtype.storm.blobstore.InputStreamWithMeta;
import backtype.storm.blobstore.LocalFsBlobStore;
-import backtype.storm.generated.*;
+import backtype.storm.generated.AccessControl;
+import backtype.storm.generated.AccessControlType;
+import backtype.storm.generated.AuthorizationException;
+import backtype.storm.generated.ClusterSummary;
+import backtype.storm.generated.ComponentCommon;
+import backtype.storm.generated.ComponentObject;
+import backtype.storm.generated.KeyNotFoundException;
+import backtype.storm.generated.ReadableBlobMeta;
+import backtype.storm.generated.SettableBlobMeta;
+import backtype.storm.generated.StormTopology;
+import backtype.storm.generated.TopologyInfo;
+import backtype.storm.generated.TopologySummary;
import backtype.storm.localizer.Localizer;
import backtype.storm.nimbus.NimbusInfo;
import backtype.storm.serialization.DefaultSerializationDelegate;
@@ -40,127 +51,61 @@ import org.apache.curator.ensemble.exhibitor.ExhibitorEnsembleProvider;
import org.apache.curator.ensemble.exhibitor.Exhibitors;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.thrift.TBase;
+import org.apache.thrift.TDeserializer;
import org.apache.thrift.TException;
+import org.apache.thrift.TSerializer;
import org.apache.zookeeper.ZooDefs;
import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Id;
import org.json.simple.JSONValue;
+import org.json.simple.parser.ParseException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintStream;
+import java.io.RandomAccessFile;
+import java.io.Serializable;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.ByteBuffer;
-import java.nio.channels.Channels;
-import java.nio.channels.WritableByteChannel;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.attribute.PosixFilePermission;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.TreeMap;
import java.util.UUID;
-import java.util.Collection;
-import java.util.Collections;
-
-import backtype.storm.serialization.DefaultSerializationDelegate;
-import backtype.storm.serialization.SerializationDelegate;
-import org.apache.curator.ensemble.exhibitor.DefaultExhibitorRestClient;
-import org.apache.curator.ensemble.exhibitor.ExhibitorEnsembleProvider;
-import org.apache.curator.ensemble.exhibitor.Exhibitors;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.commons.lang.StringUtils;
-import org.apache.thrift.TException;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.ACL;
-import org.apache.zookeeper.data.Id;
-import org.json.simple.JSONValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.yaml.snakeyaml.Yaml;
-import org.yaml.snakeyaml.constructor.SafeConstructor;
-
-import backtype.storm.Config;
-import backtype.storm.generated.ComponentCommon;
-import backtype.storm.generated.ComponentObject;
-import backtype.storm.generated.StormTopology;
-import backtype.storm.generated.AuthorizationException;
-
-import clojure.lang.IFn;
-import clojure.lang.RT;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.apache.curator.ensemble.exhibitor.DefaultExhibitorRestClient;
-import org.apache.curator.ensemble.exhibitor.ExhibitorEnsembleProvider;
-import org.apache.curator.ensemble.exhibitor.Exhibitors;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.thrift.TBase;
-import org.apache.thrift.TDeserializer;
-import org.apache.thrift.TException;
-import org.apache.thrift.TSerializer;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.ACL;
-import org.apache.zookeeper.data.Id;
-import org.json.simple.JSONValue;
-import org.json.simple.parser.ParseException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.yaml.snakeyaml.Yaml;
-import org.yaml.snakeyaml.constructor.SafeConstructor;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.nio.ByteBuffer;
-import java.nio.file.FileSystems;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.nio.file.attribute.PosixFilePermission;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.OutputStreamWriter;
-import java.io.InputStreamReader;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.FileOutputStream;
-import java.io.BufferedReader;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.PrintStream;
-import java.io.RandomAccessFile;
-import java.io.Serializable;
-import java.io.IOException;
-
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import java.util.Map;
-import java.util.Set;
-import java.util.Iterator;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.HashMap;
-import java.util.TreeMap;
-import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
@@ -168,10 +113,6 @@ import java.util.zip.GZIPOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import org.apache.thrift.TBase;
-import org.apache.thrift.TDeserializer;
-import org.apache.thrift.TSerializer;
-
public class Utils {
private static final Logger LOG = LoggerFactory.getLogger(Utils.class);
public static final String DEFAULT_STREAM_ID = "default";
@@ -1064,7 +1005,7 @@ public class Utils {
public static CuratorFramework newCurator(Map conf, List<String> servers, Object port, String root, ZookeeperAuthInfo auth) {
List<String> serverPorts = new ArrayList<String>();
- for (String zkServer: servers) {
+ for (String zkServer : servers) {
serverPorts.add(zkServer + ":" + Utils.getInt(port));
}
String zkStr = StringUtils.join(serverPorts, ",") + root;
@@ -1107,7 +1048,7 @@ public class Utils {
Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_TIMES))));
if (auth != null && auth.scheme != null && auth.payload != null) {
- builder = builder.authorization(auth.scheme, auth.payload);
+ builder.authorization(auth.scheme, auth.payload);
}
}
[4/8] storm git commit: 'un-intellij-optimizing' imports to minimize
pull request diff
Posted by bo...@apache.org.
'un-intellij-optimizing' imports to minimize pull request diff
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/2e88a2fc
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/2e88a2fc
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/2e88a2fc
Branch: refs/heads/master
Commit: 2e88a2fc2b52c43498d5d0df8b177c691c5bfa77
Parents: c53ae51
Author: Aaron Dixon <at...@gmail.com>
Authored: Tue Mar 17 15:15:10 2015 -0500
Committer: Aaron Dixon <at...@gmail.com>
Committed: Tue Jan 5 16:40:10 2016 -0600
----------------------------------------------------------------------
.../src/jvm/backtype/storm/utils/Utils.java | 31 ++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/2e88a2fc/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index f7c6d5a..2af8616 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -61,8 +61,6 @@ import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.nio.channels.WritableByteChannel;
import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
@@ -71,6 +69,35 @@ import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.UUID;
+import java.util.Collection;
+import java.util.Collections;
+
+import backtype.storm.serialization.DefaultSerializationDelegate;
+import backtype.storm.serialization.SerializationDelegate;
+import org.apache.curator.ensemble.exhibitor.DefaultExhibitorRestClient;
+import org.apache.curator.ensemble.exhibitor.ExhibitorEnsembleProvider;
+import org.apache.curator.ensemble.exhibitor.Exhibitors;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.commons.lang.StringUtils;
+import org.apache.thrift.TException;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
+import org.apache.zookeeper.data.Id;
+import org.json.simple.JSONValue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.yaml.snakeyaml.Yaml;
+import org.yaml.snakeyaml.constructor.SafeConstructor;
+
+import backtype.storm.Config;
+import backtype.storm.generated.ComponentCommon;
+import backtype.storm.generated.ComponentObject;
+import backtype.storm.generated.StormTopology;
+import backtype.storm.generated.AuthorizationException;
+
+import clojure.lang.IFn;
+import clojure.lang.RT;
import java.util.Collection;
import java.util.Collections;
[8/8] storm git commit: Added STORM-702 to changelog
Posted by bo...@apache.org.
Added STORM-702 to changelog
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/89c0f84a
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/89c0f84a
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/89c0f84a
Branch: refs/heads/master
Commit: 89c0f84ac4de0061db24f9836638ad9985497774
Parents: 4eee03f
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Mon Jan 11 09:34:18 2016 -0600
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Mon Jan 11 09:34:18 2016 -0600
----------------------------------------------------------------------
CHANGELOG.md | 1 +
README.markdown | 1 +
2 files changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/89c0f84a/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2eddb48..183e12d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
## 0.11.0
+ * STORM-702: Exhibitor support
* STORM-1160: Add hadoop-auth dependency needed for storm-core
* STORM-1404: Fix Mockito test failures in storm-kafka.
* STORM-1379: Removed Redundant Structure
http://git-wip-us.apache.org/repos/asf/storm/blob/89c0f84a/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 78b6d11..93726fe 100644
--- a/README.markdown
+++ b/README.markdown
@@ -248,6 +248,7 @@ under the License.
* Ilya Ostrovskiy ([@iostat](https://github.com/iostat))
* Satish Duggana ([@satishd](https://github.com/satishd))
* Seth Ammons ([@sethgrid](https://github.com/sethgrid))
+* Aaron Dixon ([@atdixon](https://github.com/atdixon))
## Acknowledgements
[2/8] storm git commit: clean up package imports (minimizing diff for
pull req)
Posted by bo...@apache.org.
clean up package imports (minimizing diff for pull req)
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/29bf22a2
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/29bf22a2
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/29bf22a2
Branch: refs/heads/master
Commit: 29bf22a2c2d81d4c3d9db7035d42460d3eddc1a7
Parents: 06a47a9
Author: Aaron Dixon <at...@gmail.com>
Authored: Sun Feb 15 12:00:51 2015 -0600
Committer: Aaron Dixon <at...@gmail.com>
Committed: Tue Jan 5 16:36:36 2016 -0600
----------------------------------------------------------------------
storm-core/src/jvm/backtype/storm/utils/Utils.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/29bf22a2/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index 2296209..4d2ecf1 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -49,7 +49,17 @@ import java.net.URLDecoder;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.nio.channels.WritableByteChannel;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.UUID;
+import java.util.Collection;
+import java.util.Collections;
import org.apache.curator.ensemble.exhibitor.DefaultExhibitorRestClient;
import org.apache.curator.ensemble.exhibitor.ExhibitorEnsembleProvider;