fluo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwa...@apache.org
Subject [fluo] branch master updated: Fixes #918 Prevent comma splitting for config override (#919)
Date Mon, 11 Sep 2017 14:31:28 GMT
This is an automated email from the ASF dual-hosted git repository.

mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fluo.git


The following commit(s) were added to refs/heads/master by this push:
     new 91c2603  Fixes #918 Prevent comma splitting for config override (#919)
91c2603 is described below

commit 91c260382d6668f5c990de81ccf2bf00857a5dbd
Author: Mike Walch <mwalch@apache.org>
AuthorDate: Mon Sep 11 10:31:27 2017 -0400

    Fixes #918 Prevent comma splitting for config override (#919)
    
    * Rename option from -D to -o
---
 .../src/main/java/org/apache/fluo/command/ConfigOpts.java   | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/modules/command/src/main/java/org/apache/fluo/command/ConfigOpts.java b/modules/command/src/main/java/org/apache/fluo/command/ConfigOpts.java
index 5101a02..7cb741b 100644
--- a/modules/command/src/main/java/org/apache/fluo/command/ConfigOpts.java
+++ b/modules/command/src/main/java/org/apache/fluo/command/ConfigOpts.java
@@ -16,15 +16,24 @@
 package org.apache.fluo.command;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import com.beust.jcommander.Parameter;
+import com.beust.jcommander.converters.IParameterSplitter;
 import org.apache.fluo.api.config.FluoConfiguration;
 
 public class ConfigOpts extends BaseOpts {
 
-  @Parameter(names = "-D",
-      description = "Sets configuration property. Expected format: <name>=<value>")
+  public static class NullSplitter implements IParameterSplitter {
+    @Override
+    public List<String> split(String value) {
+      return Collections.singletonList(value);
+    }
+  }
+
+  @Parameter(names = "-o", splitter = NullSplitter.class,
+      description = "Override configuration set in properties file. Expected format: -o <key>=<value>")
   private List<String> properties = new ArrayList<>();
 
   List<String> getProperties() {

-- 
To stop receiving notification emails like this one, please contact
['"commits@fluo.apache.org" <commits@fluo.apache.org>'].

Mime
View raw message