You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by td...@apache.org on 2015/11/10 02:18:56 UTC
[41/50] [abbrv] phoenix git commit: PHOENIX-2366 - Pherf NPE on Data
loader
PHOENIX-2366 - Pherf NPE on Data loader
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/a9a9b24c
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/a9a9b24c
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/a9a9b24c
Branch: refs/heads/txn
Commit: a9a9b24c904997b13fe966a9972793f1224a3564
Parents: c26cce5
Author: Cody Marcel <cm...@cmarcel-wsl1.internal.salesforce.com>
Authored: Mon Nov 2 16:15:02 2015 -0800
Committer: Cody Marcel <cm...@cmarcel-wsl1.internal.salesforce.com>
Committed: Mon Nov 2 16:46:45 2015 -0800
----------------------------------------------------------------------
.../java/org/apache/phoenix/pherf/PherfConstants.java | 10 +++++++++-
.../java/org/apache/phoenix/pherf/result/ResultUtil.java | 4 ++--
2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9a9b24c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java
----------------------------------------------------------------------
diff --git a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java
index 3acf5a5..3d504fd 100644
--- a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java
+++ b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java
@@ -78,12 +78,20 @@ public class PherfConstants {
return instance;
}
+ /**
+ * Get a {@link Properties} object based on the file name
+ * @param fileName Name of the file
+ * @param getDefault True if you want to use the properties that may have been loaded into
+ * the instance. use false if you want to reload the passed file.
+ * @return {@link Properties}
+ * @throws Exception
+ */
public Properties getProperties(final String fileName, boolean getDefault) throws Exception {
if (instanceProperties == null) {
instanceProperties = loadProperties(fileName);
} else {
- return getDefault ? loadProperties(fileName) : instanceProperties;
+ return getDefault ? instanceProperties : loadProperties(fileName);
}
return instanceProperties;
http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9a9b24c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/ResultUtil.java
----------------------------------------------------------------------
diff --git a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/ResultUtil.java b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/ResultUtil.java
index 04e6197..d16a2f9 100644
--- a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/ResultUtil.java
+++ b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/ResultUtil.java
@@ -51,8 +51,8 @@ public class ResultUtil {
try {
if (!dataLoadThreadTime.getThreadTime().isEmpty()) {
writer = new CSVFileResultHandler();
- writer.setResultFileName("Data_Load_Details");
writer.setResultFileDetails(ResultFileDetails.CSV);
+ writer.setResultFileName("Data_Load_Details");
for (WriteThreadTime writeThreadTime : dataLoadThreadTime.getThreadTime()) {
List<ResultValue> rowValues = new ArrayList<>();
@@ -86,8 +86,8 @@ public class ResultUtil {
ResultFileDetails resultFileDetails = ResultFileDetails.CSV_AGGREGATE_DATA_LOAD;
try {
writer = new CSVFileResultHandler();
- writer.setResultFileName("Data_Load_Summary");
writer.setResultFileDetails(resultFileDetails);
+ writer.setResultFileName("Data_Load_Summary");
for (TableLoadTime loadTime : dataLoadTime.getTableLoadTime()) {
List<ResultValue> rowValues = new ArrayList<>();