Package com.cloudera.crunch.type

Examples of com.cloudera.crunch.type.PTypeFamily.strings()


          public void process(CommonLogEntry input, Emitter<String> emitter) {
            if (!"127.0.0.1".equals(input.getRemoteAddress())) {
              emitter.emit(input.getResource());
            }
          }
        }, tf.strings());
  }
}
View Full Code Here


              Pair<String, String> pair =
                  Pair.of(word.toLowerCase(), filename);
              emitter.emit(pair);
            }
          }
        }, tf.tableOf(tf.strings(), tf.strings()));
  }

  public static enum LogCounters {
    LOG_LINE_ERRORS
  }
View Full Code Here

              Pair<String, String> pair =
                  Pair.of(word.toLowerCase(), filename);
              emitter.emit(pair);
            }
          }
        }, tf.tableOf(tf.strings(), tf.strings()));
  }

  public static enum LogCounters {
    LOG_LINE_ERRORS
  }
View Full Code Here

        new DoFn<CommonLogEntry, Pair<String, CommonLogEntry>>() {
          @Override
          public void process(CommonLogEntry input, Emitter<Pair<String, CommonLogEntry>> emitter) {
            emitter.emit(Pair.of(input.getRemoteAddress(), input));
          }
        }, tf.tableOf(tf.strings(), tf.records(CommonLogEntry.class)));
  }

  public static PTable<String, String> ipsAndUsers(PCollection<String> ipUsers) {
    PTypeFamily tf = ipUsers.getTypeFamily();
    return ipUsers.parallelDo(
View Full Code Here

          public void process(String input, Emitter<Pair<String, String>> emitter) {
            // first token is the IP address, and second is the username
            String[] parts = StringUtils.split(input);
            emitter.emit(Pair.of(parts[0], parts[1]));
          }
        }, tf.tableOf(tf.strings(), tf.strings()));
  }
}
View Full Code Here

          public void process(String input, Emitter<Pair<String, String>> emitter) {
            // first token is the IP address, and second is the username
            String[] parts = StringUtils.split(input);
            emitter.emit(Pair.of(parts[0], parts[1]));
          }
        }, tf.tableOf(tf.strings(), tf.strings()));
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.