Package org.apache.commons.lang.time

Examples of org.apache.commons.lang.time.StopWatch.stop()


            scan = new Scan();
            scan.setCaching(1);
            scan.setMaxResultSize(1L);
            stopWatch.start();
            table.getScanner(scan);
            stopWatch.stop();
          }
          this.getSink().publishReadTiming(tableName, serverName, stopWatch.getTime());
        } catch (TableNotFoundException tnfe) {
          // This is ignored because it doesn't imply that the regionserver is dead
        } catch (TableNotEnabledException tnee) {
View Full Code Here


            if ( indexMergerRequest.isTemporary() )
            {
                temporaryGroupIndexes.add( new TemporaryGroupIndex( mergedIndexDirectory, tempRepoId, groupId,
                                                                    indexMergerRequest.getMergedIndexTtl() ) );
            }
            stopWatch.stop();
            log.info( "merged index for repos {} in {} s", indexMergerRequest.getRepositoriesIds(),
                      stopWatch.getTime() );
            return indexingContext;
        }
        catch ( IOException e )
View Full Code Here

            IndexUpdateRequest request = new IndexUpdateRequest( indexingContext, resourceFetcher );
            request.setForceFullUpdate( this.fullDownload );
            request.setLocalIndexCacheDir( indexCacheDirectory );

            this.indexUpdater.fetchAndUpdateIndex( request );
            stopWatch.stop();
            log.info( "time to download remote repository index for repository {}: {} s", this.remoteRepository.getId(),
                      ( stopWatch.getTime() / 1000 ) );
        }
        catch ( MalformedURLException e )
        {
View Full Code Here

                    return null;
                });

                iteration.addListener(f -> {
                    stopWatch.stop();

                    if (!f.isSuccess()) {
                        final String errorMessage = String.format("Response iteration and serialization exceeded the configured threshold for request [%s] - %s", msg, f.cause().getMessage());
                        logger.warn(errorMessage);
                        ctx.writeAndFlush(ResponseMessage.build(requestMessage).code(ResponseStatusCode.SERVER_ERROR_TIMEOUT).statusMessage(errorMessage).create());
View Full Code Here

                    break;
                } else {
                    rowIndex += maxResults;
                }
            }
            stopWatch.stop();
            System.out.println("Execution: " + stopWatch);
        } finally {
            if (source != null) {
                source.close();
            }
View Full Code Here

                    break;
                } else {
                    rowIndex += maxResults;
                }
            }
            stopWatch.stop();
            System.out.println("Execution: " + stopWatch);
        } finally {
            if (source != null) {
                source.close();
            }
View Full Code Here

      try {
        if (startKey.length > 0) {
          stopWatch.start();
          table.get(get);
          stopWatch.stop();
          sink.publishReadTiming(region, column, stopWatch.getTime());
        } else {
          stopWatch.start();
          rs = table.getScanner(scan);
          stopWatch.stop();
View Full Code Here

          stopWatch.stop();
          sink.publishReadTiming(region, column, stopWatch.getTime());
        } else {
          stopWatch.start();
          rs = table.getScanner(scan);
          stopWatch.stop();
          sink.publishReadTiming(region, column, stopWatch.getTime());
        }
      } catch (Exception e) {
        sink.publishReadFailure(region, column, e);
      } finally {
View Full Code Here

          // Can't do a get on empty start row so do a Scan of first element if any instead.
          if(startKey.length > 0) {
            get = new Get(startKey);
            stopWatch.start();
            table.get(get);
            stopWatch.stop();
          } else {
            scan = new Scan();
            scan.setCaching(1);
            scan.setMaxResultSize(1L);
            stopWatch.start();
View Full Code Here

            scan = new Scan();
            scan.setCaching(1);
            scan.setMaxResultSize(1L);
            stopWatch.start();
            table.getScanner(scan);
            stopWatch.stop();
          }
          this.getSink().publishReadTiming(tableName, serverName, stopWatch.getTime());
        } catch (TableNotFoundException tnfe) {
          // This is ignored because it doesn't imply that the regionserver is dead
        } catch (TableNotEnabledException tnee) {
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.