You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2015/06/04 04:06:01 UTC

[19/50] [abbrv] storm git commit: add missing license headers

add missing license headers


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/01a66bf5
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/01a66bf5
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/01a66bf5

Branch: refs/heads/0.10.x-branch
Commit: 01a66bf5b17a9fce94fcdac4fbaa2f28c2df9189
Parents: c48f63e
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Tue May 5 16:14:33 2015 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Tue May 5 16:14:33 2015 -0400

----------------------------------------------------------------------
 .../apache/storm/flux/api/TopologySource.java   |  17 +++
 .../storm/flux/model/ConfigMethodDef.java       |  17 +++
 .../storm/flux/model/TopologySourceDef.java     |  17 +++
 .../java/org/apache/storm/flux/FrankenBean.java | 138 -------------------
 .../org/apache/storm/flux/IntegrationTest.java  |  17 +++
 .../src/main/resources/hbase_bolt.properties    |  16 +++
 .../src/main/resources/hdfs_bolt.properties     |  17 +++
 .../storm/flux/wrappers/bolts/LogInfoBolt.java  |  18 +++
 8 files changed, 119 insertions(+), 138 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/01a66bf5/flux-core/src/main/java/org/apache/storm/flux/api/TopologySource.java
----------------------------------------------------------------------
diff --git a/flux-core/src/main/java/org/apache/storm/flux/api/TopologySource.java b/flux-core/src/main/java/org/apache/storm/flux/api/TopologySource.java
index 779e676..fbccfb7 100644
--- a/flux-core/src/main/java/org/apache/storm/flux/api/TopologySource.java
+++ b/flux-core/src/main/java/org/apache/storm/flux/api/TopologySource.java
@@ -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.
+ */
 package org.apache.storm.flux.api;
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/01a66bf5/flux-core/src/main/java/org/apache/storm/flux/model/ConfigMethodDef.java
----------------------------------------------------------------------
diff --git a/flux-core/src/main/java/org/apache/storm/flux/model/ConfigMethodDef.java b/flux-core/src/main/java/org/apache/storm/flux/model/ConfigMethodDef.java
index e274915..6f7e4d4 100644
--- a/flux-core/src/main/java/org/apache/storm/flux/model/ConfigMethodDef.java
+++ b/flux-core/src/main/java/org/apache/storm/flux/model/ConfigMethodDef.java
@@ -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.
+ */
 package org.apache.storm.flux.model;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/storm/blob/01a66bf5/flux-core/src/main/java/org/apache/storm/flux/model/TopologySourceDef.java
----------------------------------------------------------------------
diff --git a/flux-core/src/main/java/org/apache/storm/flux/model/TopologySourceDef.java b/flux-core/src/main/java/org/apache/storm/flux/model/TopologySourceDef.java
index 2949659..d6a2f57 100644
--- a/flux-core/src/main/java/org/apache/storm/flux/model/TopologySourceDef.java
+++ b/flux-core/src/main/java/org/apache/storm/flux/model/TopologySourceDef.java
@@ -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.
+ */
 package org.apache.storm.flux.model;
 
 public class TopologySourceDef extends ObjectDef {

http://git-wip-us.apache.org/repos/asf/storm/blob/01a66bf5/flux-core/src/test/java/org/apache/storm/flux/FrankenBean.java
----------------------------------------------------------------------
diff --git a/flux-core/src/test/java/org/apache/storm/flux/FrankenBean.java b/flux-core/src/test/java/org/apache/storm/flux/FrankenBean.java
deleted file mode 100644
index 80a3c90..0000000
--- a/flux-core/src/test/java/org/apache/storm/flux/FrankenBean.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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.storm.flux;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-
-/**
- * Test class that is a hybrid java bean -- it has both standard
- * java bean setters, as well as public instance variables.
- */
-public class FrankenBean {
-    private static final Logger LOG = LoggerFactory.getLogger(FrankenBean.class);
-
-    public String publicString;
-    public boolean publicBoolean;
-
-    private String privateString;
-    private boolean privateBoolean;
-
-    public void setPrivateBoolean(boolean b){
-        this.privateBoolean = b;
-    }
-
-    public void setPrivateString(String string){
-        this.privateString = string;
-    }
-
-    static class Test {
-        public Test(int i){
-            System.out.println("Constructor: " + i);
-        }
-    }
-
-    public static void main(String[] args) throws Exception{
-        Integer i = new Integer(1);
-
-        Class clazz = Test.class;
-
-        Constructor ctor = clazz.getConstructor(new Class[]{int.class});
-        ctor.newInstance(i);
-
-        System.out.println("isNumber: " + Number.class.isAssignableFrom(i.getClass()));
-    }
-
-    public static void main2(String[] args) throws Exception {
-        Class clazz = Class.forName("org.apache.storm.flux.FrankenBean");
-        HashMap<String, Object> props = new HashMap<String, Object>();
-        props.put("publicString", "foo");
-        props.put("privateString", "bar");
-
-        props.put("privateBoolean", true);
-        props.put("publicBoolean", true);
-
-        props.put("notgonnafindit", "foobar");
-
-        // only support default constructors for now
-        Object instance = clazz.newInstance();
-
-        for(String key : props.keySet()){
-            Method setter = findSetter(clazz, key, props.get(key));
-            if(setter != null){
-                // invoke setter
-                setter.invoke(instance, new Object[]{props.get(key)});
-            } else {
-                // look for a public instance variable
-                Field field = findPublicField(clazz, key, props.get(key));
-                if(field != null) {
-                    field.set(instance, props.get(key));
-                }
-            }
-        }
-
-        LOG.info("Bean: {}", instance);
-
-    }
-
-
-    public static Field findPublicField(Class clazz, String property, Object arg){
-        Field field = null;
-        try{
-            field = clazz.getField(property);
-        } catch (NoSuchFieldException e){
-            LOG.warn("Could not find setter or public variable for property: " + property, e);
-        }
-        return field;
-    }
-
-    public static Method findSetter(Class clazz, String property, Object arg){
-        String setterName = toSetterName(property);
-
-//        ArrayList<Method> candidates = new ArrayList<Method>();
-        Method retval = null;
-        Method[] methods = clazz.getMethods();
-        for(Method method : methods){
-            if(setterName.equals(method.getName())) {
-                LOG.info("Found setter method: " + method.getName());
-                retval = method;
-            }
-        }
-        return retval;
-    }
-
-    public static String toSetterName(String name){
-        return "set" + name.substring(0,1).toUpperCase() + name.substring(1, name.length());
-    }
-
-    public String toString(){
-        return String.format("publicString: %s, privateString: %s, " +
-                "publicBoolean: %s, privateBoolean: %s",
-                this.publicString,
-                this.privateString,
-                this.publicBoolean,
-                this.privateBoolean);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/01a66bf5/flux-core/src/test/java/org/apache/storm/flux/IntegrationTest.java
----------------------------------------------------------------------
diff --git a/flux-core/src/test/java/org/apache/storm/flux/IntegrationTest.java b/flux-core/src/test/java/org/apache/storm/flux/IntegrationTest.java
index 2dea72a..5e17f5e 100644
--- a/flux-core/src/test/java/org/apache/storm/flux/IntegrationTest.java
+++ b/flux-core/src/test/java/org/apache/storm/flux/IntegrationTest.java
@@ -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.
+ */
 package org.apache.storm.flux;
 
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/storm/blob/01a66bf5/flux-examples/src/main/resources/hbase_bolt.properties
----------------------------------------------------------------------
diff --git a/flux-examples/src/main/resources/hbase_bolt.properties b/flux-examples/src/main/resources/hbase_bolt.properties
index 9903b41..f8ed50c 100644
--- a/flux-examples/src/main/resources/hbase_bolt.properties
+++ b/flux-examples/src/main/resources/hbase_bolt.properties
@@ -1,2 +1,18 @@
+# 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.
+
 hbase.rootdir=hdfs://hadoop:54310/hbase
 hbase.zookeeper.quorum=hadoop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/01a66bf5/flux-examples/src/main/resources/hdfs_bolt.properties
----------------------------------------------------------------------
diff --git a/flux-examples/src/main/resources/hdfs_bolt.properties b/flux-examples/src/main/resources/hdfs_bolt.properties
index dd1307d..7bcbe7a 100644
--- a/flux-examples/src/main/resources/hdfs_bolt.properties
+++ b/flux-examples/src/main/resources/hdfs_bolt.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.
+
+
 # The HDFS url
 hdfs.url=hdfs://hadoop:54310
 

http://git-wip-us.apache.org/repos/asf/storm/blob/01a66bf5/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java
----------------------------------------------------------------------
diff --git a/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java b/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java
index 5f91909..a42d7c3 100644
--- a/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java
+++ b/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java
@@ -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.
+ */
+
 package org.apache.storm.flux.wrappers.bolts;
 
 import backtype.storm.topology.BasicOutputCollector;