eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [01/46] incubator-eagle git commit: [EAGLE-325] Initialize next-gen alert engine code on branch-0.5
Date Thu, 02 Jun 2016 07:07:40 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/branch-0.5 656dd2305 -> 737e5a2d5


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/EntityAttributeResolver.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/EntityAttributeResolver.java
b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/EntityAttributeResolver.java
deleted file mode 100644
index 9758863..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/EntityAttributeResolver.java
+++ /dev/null
@@ -1,142 +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.eagle.service.alert.resolver.impl;
-
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.service.alert.resolver.AttributeResolvable;
-import org.apache.eagle.service.alert.resolver.AttributeResolveException;
-import org.apache.eagle.service.alert.resolver.BadAttributeResolveRequestException;
-import org.apache.eagle.service.alert.resolver.GenericAttributeResolveRequest;
-import org.apache.eagle.service.generic.GenericEntityServiceResource;
-import org.apache.eagle.common.DateTimeUtil;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since 6/16/15
- */
-public class EntityAttributeResolver implements AttributeResolvable<EntityAttributeResolver.EntityAttributeResolveRequest,String>
{
-
-    private final static GenericEntityServiceResource entityServiceResource = new GenericEntityServiceResource();
-
-    @Override
-    public List<String> resolve(EntityAttributeResolveRequest request) throws AttributeResolveException
{
-        if(request.getFieldName()==null){
-            throw new AttributeResolveException("fieldName is required");
-        }
-        String attributeName = request.getFieldName();
-        EntityDefinition entityDefinition;
-        try {
-            if(request.getServiceName()!=null){
-                entityDefinition = EntityDefinitionManager.getEntityByServiceName(request.getServiceName());
-            }else if (request.getEntityClassName()!=null){
-                Class<? extends TaggedLogAPIEntity> entityClass = (Class<? extends
TaggedLogAPIEntity>) Class.forName(request.getEntityClassName());
-                entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(entityClass);
-            }else {
-                throw new AttributeResolveException("At least serviceName or entityClassName
is required, but neither found");
-            }
-        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException
e) {
-            throw new AttributeResolveException(e);
-        }
-        List<String> filterCondition = new ArrayList<>();
-        if(request.getTags()!=null){
-            for(Map.Entry<String,String> tag:request.getTags().entrySet()) {
-                filterCondition.add("@" + tag.getKey() + " = \"" + tag.getValue() + "\"");
-            }
-        }
-        if(request.getQuery() != null) {
-            filterCondition.add("@" + attributeName + "~= \".*" + request.getQuery()+".*\"");
-        }
-        String query = entityDefinition.getService() + "[" + StringUtils.join(filterCondition,
" AND ") + "]<@" + attributeName + ">{count}";
-        return aggregateQuery(query, DateTimeUtil.millisecondsToHumanDateWithSeconds(0),
DateTimeUtil.millisecondsToHumanDateWithSeconds(System.currentTimeMillis()),request.getMetricName());
-    }
-
-    @Override
-    public Class<EntityAttributeResolveRequest> getRequestClass() {
-        return EntityAttributeResolveRequest.class;
-    }
-
-    @Override
-    public void validateRequest(EntityAttributeResolver.EntityAttributeResolveRequest request)
throws BadAttributeResolveRequestException {
-
-    }
-
-    private List<String> aggregateQuery(String query,String startTime,String endTime,String
metricName) throws AttributeResolveException {
-        List<String> result = new ArrayList<>();
-        GenericServiceAPIResponseEntity response = entityServiceResource.search(query, startTime,
endTime, Integer.MAX_VALUE, null, false, false, 0, Integer.MAX_VALUE, true, 0, metricName,
false);
-        if(response.isSuccess()){
-            List objs = response.getObj();
-            for(Object item:objs){
-                // TODO: get keys as result
-                throw new IllegalArgumentException("not implemented yet");
-            }
-        }else{
-            throw new AttributeResolveException(response.getException());
-        }
-        return result;
-    }
-
-    public static class EntityAttributeResolveRequest extends GenericAttributeResolveRequest
{
-        public Map<String, String> getTags() {
-            return tags;
-        }
-        private final Map<String, String> tags;
-        public String getMetricName() {
-            return metricName;
-        }
-        private final String metricName;
-        @JsonCreator
-        public EntityAttributeResolveRequest(
-                @JsonProperty("query") String query,
-                @JsonProperty("site") String site,
-                @JsonProperty("serviceName") String serviceName,
-                @JsonProperty("entityClassName") String entityClassName,
-                @JsonProperty("metricName") String metricName,
-                @JsonProperty("fieldName") String fieldName,
-                @JsonProperty("tags") Map<String, String> tags
-        ){
-            super(query, site);
-            this.serviceName = serviceName;
-            this.entityClassName = entityClassName;
-            this.fieldName = fieldName;
-            this.metricName = metricName;
-            this.tags =  tags;
-        }
-
-        private final String serviceName;
-        public String getEntityClassName() {
-            return entityClassName;
-        }
-        public String getServiceName() {
-            return serviceName;
-        }
-        public String getFieldName() {
-            return fieldName;
-        }
-        private final String entityClassName;
-        private final String fieldName;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
b/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
deleted file mode 100644
index 3833f47..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.service.alert.SiddhiAlertPolicyValidateProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/core-site.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/core-site.xml b/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/core-site.xml
deleted file mode 100644
index 06d24df..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/core-site.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-  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. See accompanying LICENSE file.
--->
-
-<!-- Put site-specific property overrides in this file. -->
-
-<configuration>
-	<property>
-        <name>fs.defaultFS</name>
-        <value>hdfs://NN URL:8020</value>
-	</property>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
b/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
deleted file mode 100644
index 3833f47..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.service.alert.SiddhiAlertPolicyValidateProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/log4j.properties
b/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/log4j.properties
deleted file mode 100644
index 3499c46..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,35 +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.
-
-log4j.rootLogger=INFO, stdout
-
- eagle.log.dir=./logs
- eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
- log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
- log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-## 30-day backup
-# log4j.appender.DRFA.MaxBackupIndex=30
- log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-alert/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/pom.xml b/eagle-core/eagle-alert/pom.xml
deleted file mode 100644
index d8585bd..0000000
--- a/eagle-core/eagle-alert/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.apache.eagle</groupId>
-		<artifactId>eagle-core</artifactId>
-		<version>0.4.0-incubating-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-alert-parent</artifactId>
-	<packaging>pom</packaging>
-
-	<name>eagle-alert-parent</name>
-	<modules>
-		<module>eagle-alert-base</module>
-		<module>eagle-alert-process</module>
-		<module>eagle-alert-service</module>
-		<module>eagle-alert-notification-plugin</module>
-	</modules>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml b/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
index 9806fef..854f628 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
@@ -78,6 +78,12 @@
       <dependency>
           <groupId>org.scala-lang</groupId>
           <artifactId>scala-reflect</artifactId>
+          <exclusions>
+              <exclusion>
+                  <groupId>org.scala-lang</groupId>
+                  <artifactId>scala-libaray</artifactId>
+              </exclusion>
+          </exclusions>
       </dependency>
       <dependency>
           <groupId>org.scalatest</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala
b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala
index c071eb2..424bdef 100644
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala
+++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala
@@ -61,7 +61,7 @@ object TestAlertAfterMap extends App{
   //env.execute
 }
 
-object StormRunnerWithoutSplitOrJoin extends Application{
+object StormRunnerWithoutSplitOrJoin extends App{
   val config : Config = ConfigFactory.load;
   val env = ExecutionEnvironments.getStorm(config)
   env.fromSpout(TestSpout()).flatMap(EchoExecutor()).flatMap(WordPrependExecutor("test"))
@@ -69,7 +69,7 @@ object StormRunnerWithoutSplitOrJoin extends Application{
 //  env.execute()
 }
 
-object StormRunnerWithSplit extends Application{
+object StormRunnerWithSplit extends App{
   val config : Config = ConfigFactory.load;
   val env = ExecutionEnvironments.getStorm(config)
   val toBeSplit = env.fromSpout(TestSpout()).flatMap(EchoExecutor())
@@ -78,7 +78,7 @@ object StormRunnerWithSplit extends Application{
 //  env.execute()
 }
 
-object StormRunnerWithUnion extends Application{
+object StormRunnerWithUnion extends App{
   val config : Config = ConfigFactory.load;
   val env = ExecutionEnvironments.getStorm(config)
   val tail1 = env.fromSpout(TestSpout()).flatMap(WordPrependExecutor("test"))
@@ -87,7 +87,7 @@ object StormRunnerWithUnion extends Application{
   env.execute()
 }
 
-object StormRunnerWithFilter extends Application{
+object StormRunnerWithFilter extends App{
   val config : Config = ConfigFactory.load;
   val env = ExecutionEnvironments.getStorm(config)
   env.fromSpout(TestSpout()).flatMap(EchoExecutor()).flatMap(WordPrependExecutor("test")).
@@ -96,7 +96,7 @@ object StormRunnerWithFilter extends Application{
   //env.execute
 }
 
-object StormRunnerWithJavaExecutor extends Application{
+object StormRunnerWithJavaExecutor extends App{
   val config : Config = ConfigFactory.load;
   val env = ExecutionEnvironments.getStorm(config)
   env.fromSpout(TestSpout()).flatMap(new JavaEchoExecutor()).flatMap(WordPrependExecutor("test")).
@@ -105,14 +105,14 @@ object StormRunnerWithJavaExecutor extends Application{
   //env.execute
 }
 
-object StormRunnerWithKeyValueSpout extends Application{
+object StormRunnerWithKeyValueSpout extends App{
   val config : Config = ConfigFactory.load;
   val env = ExecutionEnvironments.getStorm(config)
   env.fromSpout(TestKeyValueSpout()).groupBy(1).flatMap(new GroupedEchoExecutor()).parallelism(2)
   //env.execute
 }
 
-object StormRunnerWithKeyValueSpoutRenameOutputFields extends Application{
+object StormRunnerWithKeyValueSpoutRenameOutputFields extends App{
   val config : Config = ConfigFactory.load;
   val env = ExecutionEnvironments.getStorm(config)
   env.fromSpout(TestKeyValueSpout()).withOutputFields(2).groupBy(0).flatMap(new GroupedEchoExecutor()).parallelism(2)

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-core/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/pom.xml b/eagle-core/pom.xml
index f80efb3..fd0e7d1 100644
--- a/eagle-core/pom.xml
+++ b/eagle-core/pom.xml
@@ -37,7 +37,7 @@
     <modules>
         <module>eagle-data-process</module>
         <module>eagle-policy</module>
-        <module>eagle-alert</module>
+        <module>eagle-alert-parent</module>
         <module>eagle-query</module>
    		<module>eagle-machinelearning</module>
         <module>eagle-embed</module>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-external/eagle-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-kafka/pom.xml b/eagle-external/eagle-kafka/pom.xml
index f69c77c..96709a4 100644
--- a/eagle-external/eagle-kafka/pom.xml
+++ b/eagle-external/eagle-kafka/pom.xml
@@ -69,7 +69,6 @@
                         </goals>
                         <configuration>
                             <args>
-                                <arg>-make:transitive</arg>
                                 <arg>-dependencyfile</arg>
                                 <arg>${project.build.directory}/.scala_dependencies</arg>
                             </args>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-external/eagle-kafka/src/main/scala/org/apache/eagle/contrib/kafka/ProducerTool.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-kafka/src/main/scala/org/apache/eagle/contrib/kafka/ProducerTool.scala
b/eagle-external/eagle-kafka/src/main/scala/org/apache/eagle/contrib/kafka/ProducerTool.scala
index 7b6b7a3..9fdc2a6 100644
--- a/eagle-external/eagle-kafka/src/main/scala/org/apache/eagle/contrib/kafka/ProducerTool.scala
+++ b/eagle-external/eagle-kafka/src/main/scala/org/apache/eagle/contrib/kafka/ProducerTool.scala
@@ -22,7 +22,7 @@ import java.util.Properties
 
 import joptsimple._
 import kafka.message._
-import kafka.producer.ConsoleProducer.{MessageReader, LineMessageReader}
+import kafka.tools.ConsoleProducer.{MessageReader, LineMessageReader}
 import kafka.producer.{KeyedMessage, Producer, ProducerConfig}
 import kafka.serializer._
 import org.apache.commons.io.FileUtils
@@ -166,7 +166,7 @@ object ProducerTool {
     props.put("serializer.class", valueEncoderClass)
     props.put("send.buffer.bytes", socketBuffer.toString)
 
-    val reader = Class.forName(readerClass).newInstance().asInstanceOf[MessageReader[AnyRef,
AnyRef]]
+    val reader = Class.forName(readerClass).newInstance().asInstanceOf[MessageReader]
 
     if (messageData.size()>0) {
       reader.init(new ByteArrayInputStream(messageData.get(0).getBytes(StandardCharsets.UTF_8)),
cmdLineProps)
@@ -177,7 +177,7 @@ object ProducerTool {
     }
 
     try {
-      val producer = new Producer[AnyRef, AnyRef](new ProducerConfig(props))
+      val producer = new Producer[Array[Byte], Array[Byte]](new ProducerConfig(props))
 
       Runtime.getRuntime.addShutdownHook(new Thread() {
         override def run() {
@@ -185,7 +185,7 @@ object ProducerTool {
         }
       })
 
-      var message: KeyedMessage[AnyRef, AnyRef] = null
+      var message: KeyedMessage[Array[Byte], Array[Byte]] = null
       do {
         message = reader.readMessage()
         if (message != null)

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-external/eagle-log4jkafka/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/pom.xml b/eagle-external/eagle-log4jkafka/pom.xml
index afc8a8d..e9b00c8 100644
--- a/eagle-external/eagle-log4jkafka/pom.xml
+++ b/eagle-external/eagle-log4jkafka/pom.xml
@@ -72,7 +72,6 @@
                         </goals>
                         <configuration>
                             <args>
-                                <arg>-make:transitive</arg>
                                 <arg>-dependencyfile</arg>
                                 <arg>${project.build.directory}/.scala_dependencies</arg>
                             </args>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-security/eagle-security-userprofile/common/src/main/java/org/apache/eagle/security/userprofile/model/UserActivityAggModelEntity.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/common/src/main/java/org/apache/eagle/security/userprofile/model/UserActivityAggModelEntity.java
b/eagle-security/eagle-security-userprofile/common/src/main/java/org/apache/eagle/security/userprofile/model/UserActivityAggModelEntity.java
index 321cefd..bbb0edf 100644
--- a/eagle-security/eagle-security-userprofile/common/src/main/java/org/apache/eagle/security/userprofile/model/UserActivityAggModelEntity.java
+++ b/eagle-security/eagle-security-userprofile/common/src/main/java/org/apache/eagle/security/userprofile/model/UserActivityAggModelEntity.java
@@ -16,9 +16,8 @@
  */
 package org.apache.eagle.security.userprofile.model;
 
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.security.userprofile.UserProfileConstants;
 import org.apache.commons.math3.linear.Array2DRowRealMatrix;
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
 import org.apache.eagle.log.entity.meta.*;
 import org.apache.eagle.security.userprofile.UserProfileConstants;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@@ -66,7 +65,7 @@ public class UserActivityAggModelEntity extends TaggedLogAPIEntity{
         UserActivityAggModel model = new UserActivityAggModel(
                 entity.getTags().get(UserProfileConstants.USER_TAG),
                 new Array2DRowRealMatrix(entity.getCmdMatrix()),
-                scala.collection.JavaConversions.asScalaBuffer(entity.getCmdTypes()),
+                JavaConversions.<String>asScalaBuffer(entity.getCmdTypes()),
                 entity.getTags().get(UserProfileConstants.SITE_TAG),
                 entity.getTimestamp());
         return model;
@@ -74,7 +73,7 @@ public class UserActivityAggModelEntity extends TaggedLogAPIEntity{
 
     public static UserActivityAggModelEntity fromModel(final UserActivityAggModel model){
         UserActivityAggModelEntity entity = new UserActivityAggModelEntity();
-        entity.setCmdTypes(JavaConversions.asJavaList(model.cmdTypes()));
+        entity.setCmdTypes(JavaConversions.seqAsJavaList(model.cmdTypes()));
         entity.setCmdMatrix(model.matrix().getData());
         Map<String,String> tags = new HashMap<String,String>(){{
             put(UserProfileConstants.SITE_TAG,model.site());

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-security/eagle-security-userprofile/training/src/main/java/org/apache/eagle/security/userprofile/model/JavaUserProfileModeler.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/training/src/main/java/org/apache/eagle/security/userprofile/model/JavaUserProfileModeler.java
b/eagle-security/eagle-security-userprofile/training/src/main/java/org/apache/eagle/security/userprofile/model/JavaUserProfileModeler.java
index 73a8ff9..909b7b7 100644
--- a/eagle-security/eagle-security-userprofile/training/src/main/java/org/apache/eagle/security/userprofile/model/JavaUserProfileModeler.java
+++ b/eagle-security/eagle-security-userprofile/training/src/main/java/org/apache/eagle/security/userprofile/model/JavaUserProfileModeler.java
@@ -32,7 +32,7 @@ public abstract class JavaUserProfileModeler<M,C extends UserProfileContext>
imp
     public List<M> build(String site, String user, RealMatrix matrix) {
         java.util.List<M> models = generate(site, user, matrix);
         if (models != null) {
-            return JavaConversions.asScalaIterable(models).toList();
+            return JavaConversions.asScalaBuffer(models).toList();
         } else {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/eagle-security/eagle-security-userprofile/training/src/main/scala/org/apache/eagle/security/userprofile/UserProfileTrainingCLI.scala
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-userprofile/training/src/main/scala/org/apache/eagle/security/userprofile/UserProfileTrainingCLI.scala
b/eagle-security/eagle-security-userprofile/training/src/main/scala/org/apache/eagle/security/userprofile/UserProfileTrainingCLI.scala
index b8c5bde..feb6548 100644
--- a/eagle-security/eagle-security-userprofile/training/src/main/scala/org/apache/eagle/security/userprofile/UserProfileTrainingCLI.scala
+++ b/eagle-security/eagle-security-userprofile/training/src/main/scala/org/apache/eagle/security/userprofile/UserProfileTrainingCLI.scala
@@ -41,7 +41,7 @@ object UserProfileTrainingCLI{
     opt[Int]('p',"service-port") optional()  action {(x,c) => c.copy(servicePort = x)}
text "Eagle service port, default: 9099"
     opt[String]('u',"service-username") optional() action {(x,c) => c.copy(username =
x)} text "Eagle service authentication username, default: admin"
     opt[String]('w',"service-password") optional() action {(x,c) => c.copy(password =
x)} text "Eagle service authentication password, default: secure"
-    opt[Map[String,String]]('k',"kafka-props") optional()  action { (x,c) => {c.copy(kafkaProps
= ConfigurationConverter.getProperties(new MapConfiguration(JavaConversions.asJavaMap(x))))}}
text "Kafka properties, for example: topic=sometopic,metadata.brokers.list=localhost:9200"
+    opt[Map[String,String]]('k',"kafka-props") optional()  action { (x,c) => {c.copy(kafkaProps
= ConfigurationConverter.getProperties(new MapConfiguration(JavaConversions.mapAsJavaMap(x))))}}
text "Kafka properties, for example: topic=sometopic,metadata.brokers.list=localhost:9200"
     opt[String]('r',"period") optional() action {(x,c) => c.copy(period = Period.parse(x))}
text "Period window (https://en.wikipedia.org/wiki/ISO_8601#Durations), default: PT1M" //
changing it to 1M interval
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/737e5a2d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 49c2971..977a3ee 100755
--- a/pom.xml
+++ b/pom.xml
@@ -137,9 +137,9 @@
     </modules>
     <properties>
         <!-- General Properties -->
-        <java.version>1.7</java.version>
-        <scala.version>2.10</scala.version>
-        <scala-lang.version>2.10.4</scala-lang.version>
+        <java.version>1.8</java.version>
+        <scala.version>2.11</scala.version>
+        <scala-lang.version>2.11.8</scala-lang.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
@@ -148,13 +148,13 @@
         <maven-model.version>4.0.0</maven-model.version>
         <maven-release.version>2.5.1</maven-release.version>
         <maven-assembly.version>2.5.5</maven-assembly.version>
-        <maven-source.version>2.2</maven-source.version>
-        <maven-compiler.version>2.0.2</maven-compiler.version>
-        <maven-dependency.version>2.1</maven-dependency.version>
+        <maven-source.version>3.0.0</maven-source.version>
+        <maven-compiler.version>3.5.1</maven-compiler.version>
+        <maven-dependency.version>2.10</maven-dependency.version>
         <maven-license.version>2.6</maven-license.version>
         <maven-surefire.version>2.6</maven-surefire.version>
         <maven-jar.version>2.6</maven-jar.version>
-        <maven-scala.version>2.15.0</maven-scala.version>
+        <maven-scala.version>2.15.2</maven-scala.version>
         <maven-scalatest.version>1.0</maven-scalatest.version>
         <maven-tomcat7.version>2.2</maven-tomcat7.version>
         <maven-apache-rat.version>0.11</maven-apache-rat.version>
@@ -197,7 +197,7 @@
         <!-- Serialization -->
         <gson.version>2.2.2</gson.version>
         <guava.version>14.0.1</guava.version>
-        <fasterxml-jackson.version>2.2.3</fasterxml-jackson.version>
+        <fasterxml-jackson.version>2.4.5</fasterxml-jackson.version>
         <codehaus-jackson.version>1.9.13</codehaus-jackson.version>
         <jsoup.version>1.7.3</jsoup.version>
         <io.netty.version>3.6.7.Final</io.netty.version>
@@ -216,7 +216,7 @@
         <reflections.version>0.9.10</reflections.version>
 
         <!-- Streaming -->
-        <kafka.version>0.8.1.2.2.0.0-2041</kafka.version>
+        <kafka.version>0.8.2.2</kafka.version>
         <kafka-clients.version>0.8.2.0</kafka-clients.version>
         <jgrapht.version>0.9.0</jgrapht.version>
         <storm-kafka.version>0.9.3.2.2.0.0-2041</storm-kafka.version>
@@ -267,7 +267,6 @@
         <junit-benchmarks.version>0.7.0</junit-benchmarks.version>
         <h2.version>1.3.172</h2.version>
         <scalatest.version>2.2.4</scalatest.version>
-        <scala-reflect.version>2.10.0</scala-reflect.version>
         <mockito.version>1.8.1-rc1</mockito.version>
         <tomcat.embed.version>7.0.55</tomcat.embed.version>
 
@@ -345,9 +344,19 @@
             <dependency>
                 <groupId>org.scala-lang</groupId>
                 <artifactId>scala-reflect</artifactId>
-                <version>${scala-reflect.version}</version>
+                <version>${scala-lang.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.scala-lang</groupId>
+                        <artifactId>scala-library</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+            <dependency>
+                <groupId>org.scala-lang</groupId>
+                <artifactId>scala-library</artifactId>
+                <version>${scala-lang.version}</version>
             </dependency>
-
             <!-- Configuration -->
             <dependency>
                 <groupId>com.typesafe</groupId>


Mime
View raw message