asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Blow (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Remove Unused Duplicated Class
Date Tue, 30 Aug 2016 03:02:57 GMT
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 <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@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 <mblow@apache.org>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mblow@apache.org>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>

Mime
View raw message