hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon" <edwardy...@apache.org>
Subject Question about HAMA-839, "Support NullWritable in Hama Pipes"
Date Mon, 05 Oct 2015 06:09:11 GMT
Hello,

Can someone explain why below code has been removed?

Index: core/src/main/java/org/apache/hama/pipes/protocol/UplinkReader.java
===================================================================
--- core/src/main/java/org/apache/hama/pipes/protocol/UplinkReader.java
(revision 1556897)
+++ core/src/main/java/org/apache/hama/pipes/protocol/UplinkReader.java
(working copy)

@@ -99,10 +104,9 @@
         }

         int cmd = readCommand();
-        if (cmd == -1) {
-          continue;
-        }
-        LOG.debug("Handling uplink command: " + MessageType.values()[cmd]);
+        LOG.debug("Handling uplink command: " + cmd);
+        // MessageType.values()[cmd] may cause NullPointerException (bad
+        // command)


-- 
Best Regards, Edward J. Yoon

Mime
View raw message