Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

modified: src/main/java/com/snowballfinance/kddc/job/UserActionSnsJo…

…inJob.java
  • Loading branch information...
commit 9515d3c7f3b037c05e0b41d00e9a2fcdc483d9bd 1 parent 544633e
Louis Deng authored
13 src/main/java/com/snowballfinance/kddc/job/UserActionSnsJoinJob.java
@@ -137,9 +137,16 @@ protected void reduce(Text key, Iterable<UserActionSnsWritable> actions, Context
137 137 String[] actionStrs = actionItem.getActions().split("\t");
138 138 if(actionStrs != null && actionStrs.length >= 3)
139 139 {
140   - atCount += Integer.valueOf(actionStrs[0].trim(), 10);
141   - retweetCount += Integer.valueOf(actionStrs[1].trim(), 10);
142   - commentCount += Integer.valueOf(actionStrs[2].trim(), 10);
  140 + String str0 = actionStrs[0].trim();
  141 + String str1 = actionStrs[1].trim();
  142 + String str2 = actionStrs[2].trim();
  143 + try {
  144 + atCount += Integer.valueOf(str0, 10);
  145 + retweetCount += Integer.valueOf(str1, 10);
  146 + commentCount += Integer.valueOf(str2, 10);
  147 + } catch (java.lang.NumberFormatException e) {
  148 + logger.error("Join Reduce Parse Err:" + str0 + "," + str1 +"," + str2, e);
  149 + }
143 150 } else if(actionItem.isFollowed())
144 151 followed = true;
145 152 }

0 comments on commit 9515d3c

Please sign in to comment.
Something went wrong with that request. Please try again.