@SuppressWarnings("unchecked") public NamedList getStatistics() { NamedList lst = new SimpleOrderedMap(); lst.add("rollbacks", rollbackCommands.get()); lst.add("adds", addCommands.get()); lst.add("deletesById", deleteByIdCommands.get()); lst.add("deletesByQuery", deleteByQueryCommands.get()); lst.add("errors", numErrors.get()); lst.add("cumulative_adds", addCommandsCumulative.get()); lst.add("cumulative_deletesById", deleteByIdCommandsCumulative.get()); lst.add("cumulative_deletesByQuery", deleteByQueryCommandsCumulative.get()); lst.add("cumulative_errors", numErrorsCumulative.get()); return lst; }
public NamedList getStatistics() { NamedList lst = new SimpleOrderedMap(); return lst; } }
public LogUpdateProcessor(SolrQueryRequest req, SolrQueryResponse rsp, LogUpdateProcessorFactory factory, UpdateRequestProcessor next) { super( next ); this.req = req; this.rsp = rsp; maxNumToLog = factory.maxNumToLog; // TODO: make configurable // TODO: make log level configurable as well, or is that overkill? // (ryan) maybe? I added it mostly to show that it *can* be configurable this.toLog = new SimpleOrderedMap<Object>(); }
public NamedList getStatistics() { NamedList lst = new SimpleOrderedMap(); return lst; }
@Override public SimpleOrderedMap<T> clone() { ArrayList<Object> newList = new ArrayList<>(nvPairs.size()); newList.addAll(nvPairs); return new SimpleOrderedMap<>(newList); } }
@Override public SimpleOrderedMap<T> clone() { ArrayList<Object> newList = new ArrayList<>(nvPairs.size()); newList.addAll(nvPairs); return new SimpleOrderedMap<>(newList); } }
@Override public SimpleOrderedMap<T> clone() { ArrayList newList = new ArrayList(nvPairs.size()); newList.addAll(nvPairs); return new SimpleOrderedMap<T>(newList); } }
public RTimer() { time = 0; culmTime = 0; children = new SimpleOrderedMap<RTimer>(); startTime = now(); state = STARTED; }
/** * Utility function to add debugging info. This will make sure a valid * debugInfo exists before adding to it. */ public void addDebugInfo( String name, Object val ) { if( debugInfo == null ) { debugInfo = new SimpleOrderedMap<Object>(); } debugInfo.add( name, val ); }
public NamedList getStatistics() { NamedList<Long> lst = new SimpleOrderedMap<Long>(); lst.add("requests", numRequests); return lst; } }
public NamedList<Object> getStatsCounts() throws IOException { NamedList<Object> res = new SimpleOrderedMap<Object>(); res.add("stats_fields", getStatsFields()); return res; }
public NamedList getStatistics() { if( _handler != null ) { return _handler.getStatistics(); } NamedList<String> lst = new SimpleOrderedMap<String>(); lst.add("note", "not initialized yet" ); return lst; } }
public NamedList asNamedList() { NamedList<Object> m = new SimpleOrderedMap<Object>(); m.add( "time", time ); if( children.size() > 0 ) { for( Map.Entry<String, RTimer> entry : children ) { m.add( entry.getKey(), entry.getValue().asNamedList() ); } } return m; }
public SimpleOrderedMap<Object> readOrderedMap(DataInputInputStream dis) throws IOException { int sz = readSize(dis); SimpleOrderedMap<Object> nl = new SimpleOrderedMap<>(sz); for (int i = 0; i < sz; i++) { String name = (String) readVal(dis); Object val = readVal(dis); nl.add(name, val); } return nl; }
/** * returns a map of simple objects suitable for putting in a SolrQueryResponse header * @see #formatForResponseHeader * @see #parseMap */ public SimpleOrderedMap<String> getSimpleMap() { SimpleOrderedMap<String> entry = new SimpleOrderedMap<String>(); entry.add("type", type.toString()); entry.add(ID, id); entry.add("message", message); return entry; }
public SimpleOrderedMap<Object> readOrderedMap(DataInputInputStream dis) throws IOException { int sz = readSize(dis); SimpleOrderedMap<Object> nl = new SimpleOrderedMap<>(); for (int i = 0; i < sz; i++) { String name = (String) readVal(dis); Object val = readVal(dis); nl.add(name, val); } return nl; }
public SimpleOrderedMap readOrderedMap(FastInputStream dis) throws IOException { int sz = readSize(dis); SimpleOrderedMap nl = new SimpleOrderedMap(); for (int i = 0; i < sz; i++) { String name = (String)readVal(dis); Object val = readVal(dis); nl.add(name, val); } return nl; }
public NamedList getStatistics() { NamedList lst = new SimpleOrderedMap(); lst.add("handlerStart",handlerStart); lst.add("requests", numRequests); lst.add("errors", numErrors); lst.add("timeouts", numTimeouts); lst.add("totalTime",totalTime); lst.add("avgTimePerRequest", (float) totalTime / (float) this.numRequests); lst.add("avgRequestsPerSecond", (float) numRequests*1000 / (float)(System.currentTimeMillis()-handlerStart)); return lst; }
public NamedList getStatistics() { NamedList lst = new SimpleOrderedMap(); lst.add("coreName", name==null ? "(null)" : name); lst.add("startTime", new Date(startTime)); lst.add("refCount", getOpenCount()); lst.add("aliases", getCoreDescriptor().getCoreContainer().getCoreNames(this)); return lst; }
public NamedList<DocList> getMoreLikeThese( DocList docs, int rows, int flags ) throws IOException { IndexSchema schema = searcher.getSchema(); NamedList<DocList> mlt = new SimpleOrderedMap<DocList>(); DocIterator iterator = docs.iterator(); while( iterator.hasNext() ) { int id = iterator.nextDoc(); DocListAndSet sim = getMoreLikeThis( id, 0, rows, null, null, flags ); String name = schema.printableUniqueKey( reader.document( id ) ); mlt.add(name, sim.docList); } return mlt; }