From: <tho...@us...> - 2011-06-03 14:58:05
|
Revision: 4621 http://bigdata.svn.sourceforge.net/bigdata/?rev=4621&view=rev Author: thompsonbry Date: 2011-06-03 14:57:58 +0000 (Fri, 03 Jun 2011) Log Message: ----------- removed use of system.out/.err Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/TestRWJournal.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestFileSystemScanner.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskIdleTimeout.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/TestRWJournal.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/TestRWJournal.java 2011-06-03 14:56:09 UTC (rev 4620) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/TestRWJournal.java 2011-06-03 14:57:58 UTC (rev 4621) @@ -361,7 +361,8 @@ public Properties getProperties() { - System.out.println("TestRWJournal:getProperties"); + if (log.isInfoEnabled()) + log.info("TestRWJournal:getProperties"); final Properties properties = super.getProperties(); @@ -588,7 +589,8 @@ faddr = allocBatch(rw, 10000, 90, 128); faddr = allocBatch(rw, 20000, 45, 64); - System.out.println("Final allocation: " + faddr + ", allocations: " + if(log.isInfoEnabled()) + log.info("Final allocation: " + faddr + ", allocations: " + (rw.getTotalAllocations() - numAllocs) + ", allocated bytes: " + (rw.getTotalAllocationsSize() - startAllocations)); @@ -640,7 +642,8 @@ final int ints = FixedAllocator.calcBitSize(optDensity, slotSize, reserve, mod); // there are max 254 ints available to a FixedAllocator final int maxuse = (254 / (ints + 1)) * ints; - System.out.println("Allocate " + ints + ":" + (32 * ints * slotSize) + " for " + slotSize + " in " + if(log.isInfoEnabled()) + log.info("Allocate " + ints + ":" + (32 * ints * slotSize) + " for " + slotSize + " in " + reserve + " using " + maxuse + " of 254 possible"); } @@ -722,7 +725,8 @@ bufferStrategy = (RWStrategy) store.getBufferStrategy(); rw = bufferStrategy.getRWStore(); - System.out.println("Final allocations: " + (rw.getTotalAllocations() - numAllocs) + if(log.isInfoEnabled()) + log.info("Final allocations: " + (rw.getTotalAllocations() - numAllocs) + ", allocated bytes: " + (rw.getTotalAllocationsSize() - startAllocations) + ", file length: " + rw.getStoreFile().length()); } finally { @@ -771,7 +775,7 @@ store.close(); // added to try and foce bug - System.out.println("Re-open Journal"); + if(log.isInfoEnabled())log.info("Re-open Journal"); store = (Journal) getStore(); reallocBatchWithRead(store, 1, 800, 1500, tcount, true, true); reallocBatchWithRead(store, 1, 50, 250, tcount, true, true); @@ -779,33 +783,33 @@ store.close(); // .. end add to force bug - System.out.println("Re-open Journal"); + if(log.isInfoEnabled())log.info("Re-open Journal"); store = (Journal) getStore(); reallocBatchWithRead(store, 1, 2000, 10000, tcount, true, true); reallocBatchWithRead(store, 1, 200, 500, tcount, true, true); store.close(); - System.out.println("Re-open Journal"); + if(log.isInfoEnabled())log.info("Re-open Journal"); store = (Journal) getStore(); reallocBatchWithRead(store, 1, 800, 1256, tcount, true, true); reallocBatchWithRead(store, 1, 50, 250, tcount, true, true); reallocBatchWithRead(store, 1, 50, 250, tcount, true, true); showStore(store); store.close(); - System.out.println("Re-open Journal"); + if(log.isInfoEnabled())log.info("Re-open Journal"); store = (Journal) getStore(); showStore(store); reallocBatchWithRead(store, 1, 400, 1000, tcount, true, true); reallocBatchWithRead(store, 1, 1000, 2000, tcount, true, true); reallocBatchWithRead(store, 1, 400, 1000, tcount, true, true); store.close(); - System.out.println("Re-open Journal"); + if(log.isInfoEnabled())log.info("Re-open Journal"); store = (Journal) getStore(); bufferStrategy = (RWStrategy) store.getBufferStrategy(); rw = bufferStrategy.getRWStore(); - System.out.println("Final allocations: " + (rw.getTotalAllocations() - numAllocs) + if(log.isInfoEnabled())log.info("Final allocations: " + (rw.getTotalAllocations() - numAllocs) + ", allocated bytes: " + (rw.getTotalAllocationsSize() - startAllocations) + ", file length: " + rw.getStoreFile().length()); } finally { @@ -859,12 +863,13 @@ } } - void showStore(Journal store) { - RWStrategy bufferStrategy = (RWStrategy) store.getBufferStrategy(); + void showStore(final Journal store) { + + final RWStrategy bufferStrategy = (RWStrategy) store.getBufferStrategy(); - RWStore rw = bufferStrategy.getRWStore(); + final RWStore rw = bufferStrategy.getRWStore(); - System.out.println("Fixed Allocators: " + rw.getFixedAllocatorCount() + ", heap allocated: " + if(log.isInfoEnabled())log.info("Fixed Allocators: " + rw.getFixedAllocatorCount() + ", heap allocated: " + rw.getFileStorage() + ", utilised bytes: " + rw.getAllocatedSlots() + ", file length: " + rw.getStoreFile().length()); @@ -1028,7 +1033,7 @@ final StringBuilder str = new StringBuilder(); rw.getStorageStats().showStats(str); - System.out.println(str); + if(log.isInfoEnabled())log.info(str); } finally { store.destroy(); @@ -1058,7 +1063,7 @@ long faddr = bs.write(bb); // rw.alloc(buf, buf.length); - log.info("Blob Allocation at " + rw.convertFromAddr(faddr)); + if(log.isInfoEnabled())log.info("Blob Allocation at " + rw.convertFromAddr(faddr)); bb.position(0); @@ -1066,7 +1071,7 @@ assertEquals(bb, rdBuf); - System.out.println("Now commit to disk"); + if(log.isInfoEnabled())log.info("Now commit to disk"); store.commit(); @@ -1131,7 +1136,7 @@ final long pa = bs.getPhysicalAddress(faddr); bb.position(0); - System.out.println("Now commit to disk (1)"); + if(log.isInfoEnabled())log.info("Now commit to disk (1)"); store.commit(); @@ -1155,7 +1160,7 @@ * consistency of the last commit point, so we have to commit * first then test for deferred frees. */ - System.out.println("Now commit to disk (2)"); + if(log.isInfoEnabled())log.info("Now commit to disk (2)"); store.commit(); @@ -1270,7 +1275,7 @@ realAddr = rw.metaBit2Addr(allocAddr); } - System.out.println("metaAlloc lastAddr: " + realAddr); + if(log.isInfoEnabled())log.info("metaAlloc lastAddr: " + realAddr); } finally { store.destroy(); } @@ -1423,9 +1428,9 @@ store.commit(); final StringBuilder str = new StringBuilder(); rw.showAllocators(str); - System.out.println(str); + if(log.isInfoEnabled())log.info(str); store.close(); - System.out.println("Re-open Journal"); + if(log.isInfoEnabled())log.info("Re-open Journal"); store = (Journal) getStore(); showStore(store); @@ -1557,10 +1562,10 @@ // of // blocks store.commit(); - System.out.println("Final allocations: " + rw.getTotalAllocations() + ", allocated bytes: " + if(log.isInfoEnabled())log.info("Final allocations: " + rw.getTotalAllocations() + ", allocated bytes: " + rw.getTotalAllocationsSize() + ", file length: " + rw.getStoreFile().length()); store.close(); - System.out.println("Re-open Journal"); + if(log.isInfoEnabled())log.info("Re-open Journal"); store = (Journal) getStore(); showStore(store); Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestFileSystemScanner.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestFileSystemScanner.java 2011-06-03 14:56:09 UTC (rev 4620) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestFileSystemScanner.java 2011-06-03 14:57:58 UTC (rev 4621) @@ -67,7 +67,9 @@ new File("bigdata/src/java/com/bigdata/service/ndx/pipeline"), new FilenameFilter() { public boolean accept(File dir, String name) { - System.err.println("Considering: "+dir+File.separator+name); + if (log.isInfoEnabled()) + log.info("Considering: " + dir + + File.separator + name); return name.endsWith(".java"); } @@ -94,8 +96,9 @@ assertNotNull(file); } - System.err.println(Arrays.toString(files)); - + if (log.isInfoEnabled()) + log.info(Arrays.toString(files)); + n += files.length; } @@ -118,7 +121,8 @@ final Long acceptCount = scanner.call(); - System.out.println("Scanner accepted: "+acceptCount+" files"); + if (log.isInfoEnabled()) + log.info("Scanner accepted: " + acceptCount + " files"); // close buffer so task draining the buffer will terminate. buffer.close(); Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskIdleTimeout.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskIdleTimeout.java 2011-06-03 14:56:09 UTC (rev 4620) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskIdleTimeout.java 2011-06-03 14:57:58 UTC (rev 4621) @@ -576,7 +576,8 @@ + actualAverageOutputChunkSize + ", N=" + N + ", O=" + O + ", " + expectedAverageOutputChunkSize+", ratio="+r; - System.err.println(msg); + if(log.isInfoEnabled()) + log.info(msg); if (r < .8 || r > 1.1) { Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java 2011-06-03 14:56:09 UTC (rev 4620) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java 2011-06-03 14:57:58 UTC (rev 4621) @@ -699,11 +699,13 @@ final long delayMillis = (long) (r.nextDouble() * maxWriteDelay); - System.err.println("Writing on " + locator + " (delay="+delayMillis+") ..."); + if(log.isInfoEnabled()) + log.info("Writing on " + locator + " (delay="+delayMillis+") ..."); Thread.sleep(delayMillis/* ms */); - System.err.println("Wrote on " + locator + "."); + if(log.isInfoEnabled()) + log.info("Wrote on " + locator + "."); } }; @@ -840,7 +842,8 @@ for (Map.Entry<Integer, Integer> e : redirects.entrySet()) { - System.out.println("key: " + e.getKey() + " => L(" + if(log.isInfoEnabled()) + log.info("key: " + e.getKey() + " => L(" + e.getValue() + ")"); } @@ -853,14 +856,16 @@ for (Map.Entry<L, HS> e : subStats.entrySet()) { - System.out.println(e.getKey() + " : " + e.getValue()); + if(log.isInfoEnabled()) + log.info(e.getKey() + " : " + e.getValue()); } } // show the master stats - System.out.println(master.stats.toString()); + if(log.isInfoEnabled()) + log.info(master.stats.toString()); } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java 2011-06-03 14:56:09 UTC (rev 4620) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java 2011-06-03 14:57:58 UTC (rev 4621) @@ -396,7 +396,8 @@ final long delayMillis = (long) (r.nextDouble() * (maxWriteDelay - minWriteDelay)) + minWriteDelay; - System.err.println("Writing on " + chunk.length + if(log.isInfoEnabled()) + log.info("Writing on " + chunk.length + " elements on " + locator + " (delay=" + delayMillis + ") ..."); @@ -406,7 +407,8 @@ throw new RuntimeException(ex); } - System.err.println("Wrote on " + this + "."); + if(log.isInfoEnabled()) + log.info("Wrote on " + this + "."); } @@ -940,14 +942,16 @@ for (Map.Entry<L, HS> e : subStats.entrySet()) { - System.out.println(e.getKey() + " : " + e.getValue()); + if(log.isInfoEnabled()) + log.info(e.getKey() + " : " + e.getValue()); } } // show the master stats - System.out.println(master.stats.toString()); + if(log.isInfoEnabled()) + log.info(master.stats.toString()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |