You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by hu...@apache.org on 2018/07/06 22:48:35 UTC

[incubator-heron] branch huijunw/aurorametadata updated: fix comment

This is an automated email from the ASF dual-hosted git repository.

huijun pushed a commit to branch huijunw/aurorametadata
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


The following commit(s) were added to refs/heads/huijunw/aurorametadata by this push:
     new 045980b  fix comment
045980b is described below

commit 045980b0b86bff9b985b5cdf1df821d79301a100
Author: Huijun Wu <hu...@twitter.com>
AuthorDate: Fri Jul 6 15:28:59 2018 -0700

    fix comment
---
 .../heron/scheduler/aurora/AuroraScheduler.java    | 22 +++++++++++-----------
 .../src/java/org/apache/heron/spi/common/Key.java  |  3 ---
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraScheduler.java b/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraScheduler.java
index 4d4f54b..28918a7 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraScheduler.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraScheduler.java
@@ -279,17 +279,17 @@ public class AuroraScheduler implements IScheduler, IScalable {
     auroraProperties.put(AuroraField.CORE_PACKAGE_URI, heronCoreReleasePkgURI);
     auroraProperties.put(AuroraField.TOPOLOGY_PACKAGE_URI, topologyPkgURI);
 
-    if (config.containsKey(Key.AURORA_METADATA_1)) {
-      auroraProperties.put(
-          AuroraField.AURORA_METADATA_1, config.getStringValue(Key.AURORA_METADATA_1));
-    }
-    if (config.containsKey(Key.AURORA_METADATA_2)) {
-      auroraProperties.put(
-          AuroraField.AURORA_METADATA_2, config.getStringValue(Key.AURORA_METADATA_2));
-    }
-    if (config.containsKey(Key.AURORA_METADATA_3)) {
-      auroraProperties.put(
-          AuroraField.AURORA_METADATA_3, config.getStringValue(Key.AURORA_METADATA_3));
+    if (config.containsKey(Key.SCHEDULER_PROPERTIES)) {
+      String[] meta = config.getStringValue(Key.SCHEDULER_PROPERTIES).split(",");
+      if (meta.length >= 1) {
+        auroraProperties.put(AuroraField.AURORA_METADATA_1, meta[0]);
+      }
+      if (meta.length >= 2) {
+        auroraProperties.put(AuroraField.AURORA_METADATA_2, meta[1]);
+      }
+      if (meta.length >= 3) {
+        auroraProperties.put(AuroraField.AURORA_METADATA_3, meta[2]);
+      }
     }
 
     return auroraProperties;
diff --git a/heron/spi/src/java/org/apache/heron/spi/common/Key.java b/heron/spi/src/java/org/apache/heron/spi/common/Key.java
index 6c1ea09..f55bb8e 100644
--- a/heron/spi/src/java/org/apache/heron/spi/common/Key.java
+++ b/heron/spi/src/java/org/apache/heron/spi/common/Key.java
@@ -83,9 +83,6 @@ public enum Key {
   //keys for scheduler config
   SCHEDULER_IS_SERVICE     ("heron.scheduler.is.service", Boolean.TRUE),
   SCHEDULER_PROPERTIES     ("heron.scheduler.properties", Type.PROPERTIES),
-  AURORA_METADATA_1        ("heron.scheduler.aurora.metadata.1", Type.STRING),
-  AURORA_METADATA_2        ("heron.scheduler.aurora.metadata.2", Type.STRING),
-  AURORA_METADATA_3        ("heron.scheduler.aurora.metadata.3", Type.STRING),
 
   //keys for config provided user binaries and jars
   SCHEDULER_JAR            ("heron.jars.scheduler", "${HERON_LIB}/scheduler/heron-scheduler.jar"),