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/07 07:58:16 UTC

[incubator-heron] branch huijunw/aurorametadata updated (ad21c47 -> 91ab2cd)

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

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


    from ad21c47  fix style
     new 4e72134  split aurora config
     new 9abd04a  update filename
     new 91ab2cd  fix idx

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/heron/scheduler/aurora/AuroraCLIController.java | 10 +++++++---
 .../org/apache/heron/scheduler/aurora/AuroraScheduler.java     |  5 +++--
 2 files changed, 10 insertions(+), 5 deletions(-)


[incubator-heron] 01/03: split aurora config

Posted by hu...@apache.org.
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

commit 4e72134ed84765a14fc0b2565ceb7261e69320af
Author: Huijun Wu <hu...@twitter.com>
AuthorDate: Sat Jul 7 00:12:28 2018 -0700

    split aurora config
---
 .../org/apache/heron/scheduler/aurora/AuroraCLIController.java    | 8 ++++++--
 .../java/org/apache/heron/scheduler/aurora/AuroraScheduler.java   | 3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraCLIController.java b/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraCLIController.java
index 925cdcb..3870d14 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraCLIController.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraCLIController.java
@@ -68,8 +68,12 @@ class AuroraCLIController implements AuroraController {
 
     if (!extra.isEmpty()) {
       for (String field : extra.keySet()) {
-        auroraCmd.add("--bind");
-        auroraCmd.add(String.format("%s=%s", field, extra.get(field)));
+        if (field.equals(AuroraContext.JOB_TEMPLATE)) {
+          auroraFilename.replace("heron.aurora", extra.get(field));
+        } else {
+          auroraCmd.add("--bind");
+          auroraCmd.add(String.format("%s=%s", field, extra.get(field)));
+        }
       }
     }
 
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 3266319..9bd5428 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
@@ -288,8 +288,9 @@ public class AuroraScheduler implements IScheduler, IScalable {
 
     if (config.containsKey(Key.SCHEDULER_PROPERTIES)) {
       String[] meta = config.getStringValue(Key.SCHEDULER_PROPERTIES).split(",");
+      extraProperties.put(AuroraContext.JOB_TEMPLATE, meta[0]);
       for (int idx = 1; idx <= meta.length; idx++) {
-        extraProperties.put("AURORA_METADATA_" + idx, meta[idx - 1]);
+        extraProperties.put("AURORA_METADATA_" + idx, meta[idx]);
       }
     }
 


[incubator-heron] 03/03: fix idx

Posted by hu...@apache.org.
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

commit 91ab2cd6bd323ff79d7c0b41c356f58a062809a9
Author: Huijun Wu <hu...@twitter.com>
AuthorDate: Sat Jul 7 00:29:09 2018 -0700

    fix idx
---
 .../src/java/org/apache/heron/scheduler/aurora/AuroraScheduler.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 9bd5428..223ba33 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
@@ -289,7 +289,7 @@ public class AuroraScheduler implements IScheduler, IScalable {
     if (config.containsKey(Key.SCHEDULER_PROPERTIES)) {
       String[] meta = config.getStringValue(Key.SCHEDULER_PROPERTIES).split(",");
       extraProperties.put(AuroraContext.JOB_TEMPLATE, meta[0]);
-      for (int idx = 1; idx <= meta.length; idx++) {
+      for (int idx = 1; idx < meta.length; idx++) {
         extraProperties.put("AURORA_METADATA_" + idx, meta[idx]);
       }
     }


[incubator-heron] 02/03: update filename

Posted by hu...@apache.org.
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

commit 9abd04a5d105c767b819ebea7f5c82ebcaffa33c
Author: Huijun Wu <hu...@twitter.com>
AuthorDate: Sat Jul 7 00:18:03 2018 -0700

    update filename
---
 .../java/org/apache/heron/scheduler/aurora/AuroraCLIController.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraCLIController.java b/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraCLIController.java
index 3870d14..5cd710a 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraCLIController.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/aurora/AuroraCLIController.java
@@ -42,7 +42,7 @@ class AuroraCLIController implements AuroraController {
 
   private final String jobSpec;
   private final boolean isVerbose;
-  private final String auroraFilename;
+  private String auroraFilename;
 
   AuroraCLIController(
       String jobName,
@@ -69,7 +69,7 @@ class AuroraCLIController implements AuroraController {
     if (!extra.isEmpty()) {
       for (String field : extra.keySet()) {
         if (field.equals(AuroraContext.JOB_TEMPLATE)) {
-          auroraFilename.replace("heron.aurora", extra.get(field));
+          auroraFilename = auroraFilename.replace("heron.aurora", extra.get(field));
         } else {
           auroraCmd.add("--bind");
           auroraCmd.add(String.format("%s=%s", field, extra.get(field)));