You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Michael Blow (Code Review)" <do...@asterixdb.incubator.apache.org> on 2016/08/28 03:08:27 UTC
Change in asterixdb[master]: Remove Unused Duplicated Class
Michael Blow has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/1122
Change subject: Remove Unused Duplicated Class
......................................................................
Remove Unused Duplicated Class
Change-Id: I103b6e063d85b9e2659371fb341ed6f234ae3547
---
D asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/error/OutputHandler.java
1 file changed, 0 insertions(+), 96 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/22/1122/1
diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/error/OutputHandler.java b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/error/OutputHandler.java
deleted file mode 100644
index 4c83706..0000000
--- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/error/OutputHandler.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.installer.error;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.apache.asterix.event.management.IOutputHandler;
-import org.apache.asterix.event.management.OutputAnalysis;
-import org.apache.asterix.event.model.EventList.EventType;
-import org.apache.asterix.event.schema.pattern.Event;
-
-public class OutputHandler implements IOutputHandler {
-
- public static IOutputHandler INSTANCE = new OutputHandler();
-
- private OutputHandler() {
-
- }
-
- @Override
- public OutputAnalysis reportEventOutput(Event event, String output) {
-
- EventType eventType = EventType.valueOf(event.getType().toUpperCase());
- boolean ignore = true;
- String trimmedOutput = output.trim();
- StringBuffer errorMessage = new StringBuffer();
- switch (eventType) {
- case FILE_TRANSFER:
- if (trimmedOutput.length() > 0) {
- if (output.contains("Permission denied") || output.contains("cannot find or open")) {
- ignore = false;
- break;
- }
- }
- break;
-
- case BACKUP:
- case RESTORE:
- if (trimmedOutput.length() > 0) {
- if (trimmedOutput.contains("AccessControlException")) {
- errorMessage.append("Insufficient permissions on back up directory");
- ignore = false;
- }
- if (output.contains("does not exist") || output.contains("File exist")
- || (output.contains("No such file or directory"))) {
- ignore = true;
- } else {
- ignore = false;
- }
- }
- break;
-
- case NODE_INFO:
- Properties p = new Properties();
- try {
- p.load(new ByteArrayInputStream(trimmedOutput.getBytes()));
- } catch (IOException e) {
- }
- String javaVersion = (String) p.get("java_version");
- if (p.get("java_version") == null) {
- errorMessage.append("Java not installed on " + event.getNodeid().getValue().getAbsvalue());
- ignore = false;
- } else if (!javaVersion.contains("1.7")) {
- errorMessage.append("Asterix requires Java 1.7.x. Incompatible version found on "
- + event.getNodeid().getValue().getAbsvalue() + "\n");
- ignore = false;
- }
- break;
- default:
- break;
- }
- if (ignore) {
- return new OutputAnalysis(true, null);
- } else {
- return new OutputAnalysis(false, errorMessage.toString());
- }
- }
-}
--
To view, visit https://asterix-gerrit.ics.uci.edu/1122
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I103b6e063d85b9e2659371fb341ed6f234ae3547
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Change in asterixdb[master]: Remove Unused Duplicated Class
Posted by "Michael Blow (Code Review)" <do...@asterixdb.incubator.apache.org>.
Michael Blow has submitted this change and it was merged.
Change subject: Remove Unused Duplicated Class
......................................................................
Remove Unused Duplicated Class
Change-Id: I103b6e063d85b9e2659371fb341ed6f234ae3547
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1122
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>
---
D asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/error/OutputHandler.java
1 file changed, 0 insertions(+), 96 deletions(-)
Approvals:
Till Westmann: Looks good to me, approved
Jenkins: Verified; No violations found; Verified
diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/error/OutputHandler.java b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/error/OutputHandler.java
deleted file mode 100644
index 4c83706..0000000
--- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/error/OutputHandler.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.installer.error;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.apache.asterix.event.management.IOutputHandler;
-import org.apache.asterix.event.management.OutputAnalysis;
-import org.apache.asterix.event.model.EventList.EventType;
-import org.apache.asterix.event.schema.pattern.Event;
-
-public class OutputHandler implements IOutputHandler {
-
- public static IOutputHandler INSTANCE = new OutputHandler();
-
- private OutputHandler() {
-
- }
-
- @Override
- public OutputAnalysis reportEventOutput(Event event, String output) {
-
- EventType eventType = EventType.valueOf(event.getType().toUpperCase());
- boolean ignore = true;
- String trimmedOutput = output.trim();
- StringBuffer errorMessage = new StringBuffer();
- switch (eventType) {
- case FILE_TRANSFER:
- if (trimmedOutput.length() > 0) {
- if (output.contains("Permission denied") || output.contains("cannot find or open")) {
- ignore = false;
- break;
- }
- }
- break;
-
- case BACKUP:
- case RESTORE:
- if (trimmedOutput.length() > 0) {
- if (trimmedOutput.contains("AccessControlException")) {
- errorMessage.append("Insufficient permissions on back up directory");
- ignore = false;
- }
- if (output.contains("does not exist") || output.contains("File exist")
- || (output.contains("No such file or directory"))) {
- ignore = true;
- } else {
- ignore = false;
- }
- }
- break;
-
- case NODE_INFO:
- Properties p = new Properties();
- try {
- p.load(new ByteArrayInputStream(trimmedOutput.getBytes()));
- } catch (IOException e) {
- }
- String javaVersion = (String) p.get("java_version");
- if (p.get("java_version") == null) {
- errorMessage.append("Java not installed on " + event.getNodeid().getValue().getAbsvalue());
- ignore = false;
- } else if (!javaVersion.contains("1.7")) {
- errorMessage.append("Asterix requires Java 1.7.x. Incompatible version found on "
- + event.getNodeid().getValue().getAbsvalue() + "\n");
- ignore = false;
- }
- break;
- default:
- break;
- }
- if (ignore) {
- return new OutputAnalysis(true, null);
- } else {
- return new OutputAnalysis(false, errorMessage.toString());
- }
- }
-}
--
To view, visit https://asterix-gerrit.ics.uci.edu/1122
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I103b6e063d85b9e2659371fb341ed6f234ae3547
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Change in asterixdb[master]: Remove Unused Duplicated Class
Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.
Change subject: Remove Unused Duplicated Class
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://asterix-gerrit.ics.uci.edu/1122
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I103b6e063d85b9e2659371fb341ed6f234ae3547
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No
Change in asterixdb[master]: Remove Unused Duplicated Class
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Remove Unused Duplicated Class
......................................................................
Patch Set 1:
Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/486/
--
To view, visit https://asterix-gerrit.ics.uci.edu/1122
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I103b6e063d85b9e2659371fb341ed6f234ae3547
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No
Change in asterixdb[master]: Remove Unused Duplicated Class
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Remove Unused Duplicated Class
......................................................................
Patch Set 1:
Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2424/
--
To view, visit https://asterix-gerrit.ics.uci.edu/1122
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I103b6e063d85b9e2659371fb341ed6f234ae3547
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No
Change in asterixdb[master]: Remove Unused Duplicated Class
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Remove Unused Duplicated Class
......................................................................
Patch Set 1: Integration-Tests+1
Integration Tests Successful
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/486/ : SUCCESS
--
To view, visit https://asterix-gerrit.ics.uci.edu/1122
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I103b6e063d85b9e2659371fb341ed6f234ae3547
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No