Package org.elasticsearch.common.joda.time

Examples of org.elasticsearch.common.joda.time.DateTime


    writeDouble(name,Double.toString(val));
  }

  public void writeDate(String name, Date val) throws IOException {
    // updated to use Joda time
    writeDate(name, new DateTime(val).toString(dateFormat));
  }
View Full Code Here


            }
        }

        public void logJson(RestResponse response, long contentLength, long now) {
            long latency = now - timestamp;
            DateTime nowdt = new DateTime(now);
            DateTime startdt = new DateTime(timestamp);
            try {
                XContentBuilder json = XContentFactory.jsonBuilder().startObject();
                json.field("time", nowdt.toDateTimeISO().toString());
                json.field("starttime", startdt.toDateTimeISO().toString());
                json.field("localaddr", localaddr);
                json.field("localport", localport);
                json.field("remoteaddr", remoteaddr);
                json.field("remoteport", remoteport);
                json.field("scheme", scheme);
View Full Code Here

            // We store the lastupdate date and some stats

            // We need to round that lastest date to the lower second and
            // remove 2 seconds.
            // See #82: https://github.com/dadoonet/fsriver/issues/82
            scanDate = new DateTime(scanDate).secondOfDay().roundFloorCopy().minusSeconds(2).toDate();

            XContentBuilder xb = jsonBuilder()
                    .startObject()
                    .startObject("fs")
                    .field("feedname", fsdef.getRivername())
View Full Code Here

                        if (path != null) {
                            logger.info("     ---> content of [{}]:", path);
                            File[] files = new File(path).listFiles();
                            for (int i = 0; i < files.length; i++) {
                                File file = files[i];
                                logger.info("         - {} {}", file.getAbsolutePath(), new DateTime(file.lastModified()));
                            }
                        }
                        return false;
                    }
                }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.joda.time.DateTime

Copyright © 2018 www.massapicom. 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.