/** * Returns an enumerable collection of log records, retrieved lazily. * * @param service * A {@link StorageService} enumeration value that indicates which storage service to use. * @return * An enumerable collection of objects that implement <code>ListBlobItem</code> and are retrieved lazily. * @throws URISyntaxException * @throws StorageException */ public Iterable<LogRecord> listLogRecords(StorageService service) throws URISyntaxException, StorageException { return this .listLogRecords(service, null /* startTime */, null /* endTime */, null /* options */, null /* operationContext */); }
/** * Returns an enumerable collection of log records, retrieved lazily. * * @param service * A {@link StorageService} enumeration value that indicates which storage service to use. * @return * An enumerable collection of objects that implement <code>ListBlobItem</code> and are retrieved lazily. * @throws URISyntaxException * @throws StorageException */ public Iterable<LogRecord> listLogRecords(StorageService service) throws URISyntaxException, StorageException { return this .listLogRecords(service, null /* startTime */, null /* endTime */, null /* options */, null /* operationContext */); }
/** * Validate Log Parser with prod data * * @throws ParseException * @throws URISyntaxException * @throws StorageException * @throws IOException * @throws InterruptedException */ @Test public void testCloudAnalyticsClientParseProdLogs() throws ParseException, URISyntaxException, StorageException, IOException { Calendar startTime = new GregorianCalendar(); startTime.add(GregorianCalendar.HOUR_OF_DAY, -2); Iterator<LogRecord> logRecordsIterator = (this.client.listLogRecords(StorageService.BLOB, startTime.getTime(), null, null, null)).iterator(); while (logRecordsIterator.hasNext()) { // Makes sure there's no exceptions thrown and that no records are null. // Primarily a sanity check. LogRecord rec = logRecordsIterator.next(); System.out.println(rec.getRequestUrl()); assertNotNull(rec); } }