Examples of toJSON()


Examples of org.apache.hadoop.log.LogSample.toJSON()

      sample.addNormalValue(LOGKEYS.Cluster.name(), fs.getUri().getAuthority());
      if (ex != null) {
        sample.addNormalValue(LOGKEYS.Error.name(),
            StringUtils.stringifyException(ex));
      }
      DECODER_METRICS_LOG.info(sample.toJSON());

    } catch(Exception e) {
      LOG.warn("Exception when logging the Raid metrics: " + e.getMessage(),
               e);
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.json.JsonObject.toJson()

    private static String normalize(String json) {
        JsopTokenizer t = new JsopTokenizer(json);
        t.read('{');
        JsonObject o = JsonObject.create(t);
        JsopBuilder w = new JsopBuilder();
        o.toJson(w);
        return w.toString();
    }

    private String commit(String diff, boolean conflictExpected) {
        boolean ok = false;
View Full Code Here

Examples of org.apache.jackrabbit.oak.commons.json.JsonObject.toJson()

    private static String normalize(String json) {
        JsopTokenizer t = new JsopTokenizer(json);
        t.read('{');
        JsonObject o = JsonObject.create(t);
        JsopBuilder w = new JsopBuilder();
        o.toJson(w);
        return w.toString();
    }

    private String commit(String diff, boolean conflictExpected) {
        boolean ok = false;
View Full Code Here

Examples of org.apache.mahout.classifier.df.data.Dataset.toJSON()

    log.info("generating the dataset...");
    Dataset dataset = generateDataset(descriptor, dataPath, regression);

    log.info("storing the dataset description");
    String json = dataset.toJSON();
    DFUtils.storeString(new Configuration(), fPath, json);
  }

  private static Dataset generateDataset(String descriptor, String dataPath, boolean regression) throws IOException,
      DescriptorException {
View Full Code Here

Examples of org.apache.olio.webapp.model.Person.toJson()

        } else if (AT_ADD_FRIEND.equals(actionType)) {
            p = addFriend(request);
        }

        if (p != null) {
            out.write(p.toJson());
        }
        out.close();
        return null;
    }
View Full Code Here

Examples of org.apache.slider.core.persist.ConfTreeSerDeser.toJson()

   */
  public static ConfTreeOperations fromInstance(ConfTree instance) throws
                                                                 IOException {
    ConfTreeSerDeser confTreeSerDeser = new ConfTreeSerDeser();
    ConfTreeOperations ops = new ConfTreeOperations(
       confTreeSerDeser.fromJson(confTreeSerDeser.toJson(instance)) );
    return ops;
  }

  /**
   * Load from a file and merge it in
View Full Code Here

Examples of org.apache.stanbol.factstore.model.FactResultSet.toJSON()

      CorsHelper.addCORSOrigin(servletContext, rb, requestHeaders);
      return rb.build();
    }

    if (rs != null) {
        ResponseBuilder rb = Response.ok(rs.toJSON());
        CorsHelper.addCORSOrigin(servletContext, rb, requestHeaders);
      return rb.build();
    } else {
        ResponseBuilder rb = Response.ok();
        CorsHelper.addCORSOrigin(servletContext, rb, requestHeaders);
View Full Code Here

Examples of org.apache.tajo.algebra.Expr.toJson()

    Preconditions.checkNotNull(sqlPath, hiveqlPath);
    String sql = FileUtil.readTextFile(new File(BASE_PATH + sqlPath));
    String hiveQL = FileUtil.readTextFile(new File(BASE_PATH + hiveqlPath));
    Expr expr = parseQuery(sql);
    Expr hiveExpr = parseHiveQL(hiveQL);
    assertEquals(expr.toJson(), hiveExpr.toJson());
  }

  @Test
  public void testSelect1() throws IOException {
    compareJsonResult("select_1.sql");
View Full Code Here

Examples of org.boon.json.ObjectMapper.toJson()

                List<Object> res = new ArrayList<Object>();
                while (query.hasNext()) {
                    res.add(query.next());
                }
                ObjectMapper mapper = new ObjectMapperImpl();
                result = mapper.toJson(res);
            }
            return new Result("boon", time, result, error);
        }
    }
View Full Code Here

Examples of org.boon.json.implementation.ObjectMapperImpl.toJson()

                List<Object> res = new ArrayList<Object>();
                while (query.hasNext()) {
                    res.add(query.next());
                }
                ObjectMapper mapper = new ObjectMapperImpl();
                result = mapper.toJson(res);
            }
            return new Result("boon", time, result, error);
        }
    }
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.