From f6dc63a48e6443912b8dd389c935c4a26d15e2a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Mart=C3=ADnez?= Date: Thu, 23 Feb 2017 12:48:49 +0100 Subject: [PATCH] Upgrade to Spark 2.1.0 (#54) * Remove deprecated SparkLoggerComponent * Bump Spark to 2.1.0 * Update CHANGELOG.md --- CHANGELOG.md | 8 ++- pom.xml | 2 +- .../logger/impl/SparkLoggerComponent.scala | 52 ------------------- .../utils/integration/ZookeeperTest.scala | 4 +- 4 files changed, 9 insertions(+), 57 deletions(-) delete mode 100644 src/main/scala/com/stratio/common/utils/components/logger/impl/SparkLoggerComponent.scala diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dfec88..8a20467 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,16 @@ # Changelog +Only listing significant user-visible, not internal code cleanups and minor bug fixes. + ## 0.10.0 (upcoming) -* Pending changelog +* Bump Spark to 2.1.0 +* Bump Curator to 3.2.0 +* Remove Spark Logging ## 0.9.0 (February 07, 2017) -* Pending changelog +* Add exists path in DAO Components ## 0.8.0 (January 30, 2017) diff --git a/pom.xml b/pom.xml index d5226d8..7a62457 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ 2.4.9 3.4.0 3.2.0 - 1.6.2 + 2.1.0 1.7.7 7.2.1 diff --git a/src/main/scala/com/stratio/common/utils/components/logger/impl/SparkLoggerComponent.scala b/src/main/scala/com/stratio/common/utils/components/logger/impl/SparkLoggerComponent.scala deleted file mode 100644 index 0da3892..0000000 --- a/src/main/scala/com/stratio/common/utils/components/logger/impl/SparkLoggerComponent.scala +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2015 Stratio (http://stratio.com) - * - * 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 com.stratio.common.utils.components.logger.impl - -import com.stratio.common.utils.components.logger.LoggerComponent -import org.apache.spark.Logging - -trait SparkLoggerComponent extends LoggerComponent with Logging { - - val logger: Logger = new SparkLogger(log) - - class SparkLogger(logger: org.slf4j.Logger) extends Logger { - - def name: String = logger.getName - - def debug(msg: String): Unit = logger.debug(msg) - - def error(msg: String): Unit = logger.error(msg) - - def error(msg: String, ex: Throwable): Unit = logger.error(msg, ex) - - def info(msg: String): Unit = logger.info(msg) - - def warn(msg: String): Unit = logger.warn(msg) - - def trace(msg: String): Unit = logger.trace(msg) - - def isDebugEnabled: Boolean = logger.isDebugEnabled - - def isErrorEnabled: Boolean = logger.isErrorEnabled - - def isInfoEnabled: Boolean = logger.isInfoEnabled - - def isWarnEnabled: Boolean = logger.isWarnEnabled - - def isTraceEnabled: Boolean = logger.isTraceEnabled - - } -} diff --git a/src/test/scala/com/stratio/common/utils/integration/ZookeeperTest.scala b/src/test/scala/com/stratio/common/utils/integration/ZookeeperTest.scala index 38c5d1f..e71b107 100644 --- a/src/test/scala/com/stratio/common/utils/integration/ZookeeperTest.scala +++ b/src/test/scala/com/stratio/common/utils/integration/ZookeeperTest.scala @@ -17,7 +17,7 @@ package com.stratio.common.utils.integration import com.stratio.common.utils.components.config.impl.TypesafeConfigComponent import com.stratio.common.utils.components.dao.GenericDAOComponent -import com.stratio.common.utils.components.logger.impl.SparkLoggerComponent +import com.stratio.common.utils.components.logger.impl.Slf4jLoggerComponent import org.apache.curator.test.TestingServer import org.apache.curator.utils.CloseableUtils import org.junit.runner.RunWith @@ -88,7 +88,7 @@ class ZookeeperIntegrationTest extends WordSpec } -trait DummyDAOComponent extends GenericDAOComponent[Dummy] with TypesafeConfigComponent with SparkLoggerComponent { +trait DummyDAOComponent extends GenericDAOComponent[Dummy] with TypesafeConfigComponent with Slf4jLoggerComponent { override val dao : DAO = new GenericDAO(Option("dummy")) }