You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Wail Alkowaileet (Code Review)" <do...@asterixdb.incubator.apache.org> on 2018/11/09 18:51:20 UTC

Change in asterixdb[master]: [NO ISSUE][LOG] Ensure NC logDir ends with separator

Wail Alkowaileet has submitted this change and it was merged.

Change subject: [NO ISSUE][LOG] Ensure NC logDir ends with separator
......................................................................


[NO ISSUE][LOG] Ensure NC logDir ends with separator

- user model changes: no
- storage format changes: no
- interface changes: no

Change-Id: I492428fdbf84ed6f1c4afd136dce33ac84aea3c0
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2982
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <im...@apache.org>
---
M asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf
M hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java
2 files changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Till Westmann: Looks good to me, approved
  Jenkins: Verified; No violations found; ; Verified
  Ian Maxon: Looks good to me, approved



diff --git a/asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf b/asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf
index e779dc2..2824219 100644
--- a/asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf
+++ b/asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf
@@ -17,6 +17,7 @@
 
 [common]
 log.level=INFO
+log.dir=logs
 
 [nc]
 txn.log.dir=txnlog
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java
index 990d6c9..f4d10cb 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java
@@ -18,6 +18,9 @@
  */
 package org.apache.hyracks.control.nc;
 
+import java.io.File;
+import java.net.URI;
+
 import org.apache.hyracks.control.common.controllers.NCConfig;
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.LoggerContext;
@@ -30,8 +33,6 @@
 import org.apache.logging.log4j.core.config.builder.api.LayoutComponentBuilder;
 import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
 
-import java.net.URI;
-
 public class NCLogConfigurationFactory extends ConfigurationFactory {
     private NCConfig config;
 
@@ -42,6 +43,7 @@
     public Configuration createConfiguration(ConfigurationBuilder<BuiltConfiguration> builder) {
         String nodeId = config.getNodeId();
         String logDir = config.getLogDir();
+        logDir = logDir.endsWith(File.separator) ? logDir : logDir + File.separator;
         builder.setStatusLevel(Level.WARN);
         builder.setConfigurationName("RollingBuilder");
         // create a rolling file appender

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2982
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I492428fdbf84ed6f1c4afd136dce33ac84aea3c0
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Wail Alkowaileet <wa...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian2 Maxon <im...@uci.edu>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Wail Alkowaileet <wa...@gmail.com>