Examples of MrTask


Examples of org.apache.hadoop.chukwa.rest.objects.MrTask

    // get one object
    @GET
    @Path("task_id/{task_id}")
    @Produces({"application/xml","text/xml"})
    public String getByTask_IdXML( @PathParam ("task_id") String task_id) {
  MrTask model = MrTaskHome.find(task_id);
  return convertToXml(model);
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.MrTask

   
    @GET
    @Path("task_id/{task_id}")
    @Produces("application/json")
    public String getByTask_IdJason( @PathParam ("task_id") String task_id) {
  MrTask model = MrTaskHome.find(task_id);
  return convertToJson(model);
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.MrTask

   
    @GET
    @Path("task_id/{task_id}")
    @Produces({"text/plain","text/csv"})
    public String getByTask_IdCsv( @PathParam ("task_id") String task_id) {
  MrTask model = MrTaskHome.find(task_id);
  return convertToCsv(model);
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.MrTask

    private static String table="[mr_task]";
    private static final Log log = LogFactory
  .getLog(MrTaskHome.class);

    private static MrTask createMrTask(ResultSet rs) {
  MrTask obj = null;
  try {
      obj = new MrTask(

        rs.getString("task_id"),
        rs.getString("job_id"),
        rs.getTimestamp("start_time"),
        rs.getTimestamp("finish_time"),
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.MrTask

      // get simple value
            try {
    String query = getSingleQuery(MrTaskHome.table,"task_id",task_id);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        MrTask obj = createMrTask(rs);
        return obj;
    }
      } catch (Exception e) {
    log.error("exception:"+e.toString());
      }
View Full Code Here

Examples of water.MRTask

   * A.numCols() == d.size()
   */
  private static Frame execDiagonal(final Frame A, Vector d) {
    final H2OBCast<Vector> bd = new H2OBCast<Vector>(d);

    return new MRTask() {
      public void map(Chunk chks[], NewChunk ncs[]) {
        Vector D = bd.value();
        int chunkSize = chks[0].len();

        for (int c = 0; c < ncs.length; c++) {
View Full Code Here

Examples of water.MRTask

   * A.numCols() == b.rowSize()
   */
  private static Frame execCommon(final Frame A, Matrix b) {
    final H2OBCast<Matrix> bb = new H2OBCast<Matrix>(b);

    return new MRTask() {
      public void map(Chunk chks[], NewChunk ncs[]) {
        Matrix B = bb.value();
        int chunkSize = chks[0].len();

        for (int c = 0; c < ncs.length; c++) {
View Full Code Here

Examples of water.MRTask

    // Ax is written into nc (single element, not array) with an MRTask on A,
    // and therefore will be similarly partitioned as A.
    //
    // x.size() == A.numCols() == chks.length
    Frame Ax = new MRTask() {
        public void map(Chunk chks[], NewChunk nc) {
          int chunkSize = chks[0].len();
          Vector x = bx.value();

          for (int r = 0; r < chunkSize; r++) {
View Full Code Here

Examples of water.MRTask

    Frame A = drmA.frame;
    Vec keys = drmA.keys;

    // Run a filtering MRTask on A. If row number falls within R.start() and
    // R.end(), then the row makes it into the output
    Frame Arr = new MRTask() {
        public void map(Chunk chks[], NewChunk ncs[]) {
          int chunkSize = chks[0].len();
          long chunkStart = chks[0].start();

          // First check if the entire chunk even overlaps with R
          if (chunkStart > R.end() || (chunkStart + chunkSize) < R.start()) {
            return;
          }

          // This chunk overlaps, filter out just the overlapping rows
          for (int r = 0; r < chunkSize; r++) {
            if (!R.contains(chunkStart + r)) {
              continue;
            }

            for (int c = 0; c < chks.length; c++) {
              ncs[c].addNum(chks[c].at0(r));
            }
          }
        }
      }.doAll(A.numCols(), A).outputFrame(null, null);

    Vec Vrr = (keys == null) ? null : new MRTask() {
        // This is a String keyed DRM. Do the same thing as above,
        // but this time just one column of Strings.
        public void map(Chunk chk, NewChunk nc) {
          int chunkSize = chk.len();
          long chunkStart = chk.start();
View Full Code Here

Examples of water.MRTask

    // AewB is written into ncs[] with an MRTask on A, and therefore will
    // be similarly partitioned as A.
    //
    // B may or may not be similarly partitioned as A, but must have the
    // same dimensions of A.
    Frame AewB = new MRTask() {
        private double opfn(String op, double a, double b) {
          if (a == 0.0 && b == 0.0) {
            return 0.0;
          }
          if (op.equals("+")) {
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.