SLIDER-579 "slider lookup" command
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/69712cb5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/69712cb5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/69712cb5 Branch: refs/heads/develop Commit: 69712cb5e043fe3565ebcc29f6e656f844808da5 Parents: 7346265 Author: Steve Loughran <[email protected]> Authored: Thu Oct 30 11:24:58 2014 +0000 Committer: Steve Loughran <[email protected]> Committed: Fri Oct 31 11:07:49 2014 +0000 ---------------------------------------------------------------------- .../src/main/java/org/apache/slider/client/SliderClient.java | 1 + .../main/java/org/apache/slider/common/params/ClientArgs.java | 1 + .../java/org/apache/slider/core/exceptions/ErrorStrings.java | 2 +- .../main/java/org/apache/slider/core/persist/JsonSerDeser.java | 4 +++- 4 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/69712cb5/slider-core/src/main/java/org/apache/slider/client/SliderClient.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/client/SliderClient.java b/slider-core/src/main/java/org/apache/slider/client/SliderClient.java index f1f8f97..b2e343d 100644 --- a/slider-core/src/main/java/org/apache/slider/client/SliderClient.java +++ b/slider-core/src/main/java/org/apache/slider/client/SliderClient.java @@ -1019,6 +1019,7 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe ApplicationReport report = launchedApplication.getApplicationReport(); SerializedApplicationReport sar = new SerializedApplicationReport(report); + sar.submitTime = System.currentTimeMillis(); ApplicationReportSerDeser serDeser = new ApplicationReportSerDeser(); serDeser.save(sar, launchArgs.getOutputFile()); } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/69712cb5/slider-core/src/main/java/org/apache/slider/common/params/ClientArgs.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/common/params/ClientArgs.java b/slider-core/src/main/java/org/apache/slider/common/params/ClientArgs.java index 5ee6cd5..a3b7997 100644 --- a/slider-core/src/main/java/org/apache/slider/common/params/ClientArgs.java +++ b/slider-core/src/main/java/org/apache/slider/common/params/ClientArgs.java @@ -96,6 +96,7 @@ public class ClientArgs extends CommonArgs { actionInstallKeytabArgs, actionKillContainerArgs, actionListArgs, + actionLookupArgs, actionRegistryArgs, actionResolveArgs, actionStatusArgs, http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/69712cb5/slider-core/src/main/java/org/apache/slider/core/exceptions/ErrorStrings.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/core/exceptions/ErrorStrings.java b/slider-core/src/main/java/org/apache/slider/core/exceptions/ErrorStrings.java index 894f19b..8b04969 100644 --- a/slider-core/src/main/java/org/apache/slider/core/exceptions/ErrorStrings.java +++ b/slider-core/src/main/java/org/apache/slider/core/exceptions/ErrorStrings.java @@ -20,7 +20,7 @@ package org.apache.slider.core.exceptions; public interface ErrorStrings { String E_UNSTABLE_CLUSTER = "Unstable Application Instance :"; - String E_CLUSTER_RUNNING = "Application Instance already running"; + String E_CLUSTER_RUNNING = "Application Instance running"; String E_ALREADY_EXISTS = "already exists"; String PRINTF_E_INSTANCE_ALREADY_EXISTS = "Application Instance \"%s\" already exists and is defined in %s"; String PRINTF_E_INSTANCE_DIR_ALREADY_EXISTS = "Application Instance dir already exists: %s"; http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/69712cb5/slider-core/src/main/java/org/apache/slider/core/persist/JsonSerDeser.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/core/persist/JsonSerDeser.java b/slider-core/src/main/java/org/apache/slider/core/persist/JsonSerDeser.java index 2c119ff..4d7d310 100644 --- a/slider-core/src/main/java/org/apache/slider/core/persist/JsonSerDeser.java +++ b/slider-core/src/main/java/org/apache/slider/core/persist/JsonSerDeser.java @@ -244,8 +244,10 @@ public class JsonSerDeser<T> { String json = toJson(instance); byte[] b = json.getBytes(UTF_8); dataOutputStream.write(b); - } finally { + dataOutputStream.flush(); dataOutputStream.close(); + } finally { + IOUtils.closeStream(dataOutputStream); } }
