Revision 7103
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/admin/upgrade/dataone/GenerateSystemMetadata.java | ||
---|---|---|
107 | 107 |
// for testing, subset to a limited random number |
108 | 108 |
boolean test = false; |
109 | 109 |
if (test) { |
110 |
//idList = DBUtil.getAllDocidsByType(null, true, serverLocation); |
|
111 |
idList = DBUtil.getAllDocids("knb-lter-%"); // use a scope |
|
110 |
//idList = DBUtil.getAllDocidsByType("eml://ecoinformatics.org/eml-2.1.0", true, serverLocation); |
|
111 |
idList = DBUtil.getAllDocids("knb-lter-gce"); // use a scope |
|
112 |
Collections.sort(idList); |
|
113 |
//Collections.shuffle(idList); |
|
112 | 114 |
int limit = Math.min(idList.size(), 100); |
113 |
Collections.shuffle(idList); |
|
114 | 115 |
idList = idList.subList(0, limit); |
115 | 116 |
log.debug("limiting random list to: " + limit); |
117 |
for (String docid: idList) { |
|
118 |
log.debug("GENERATING SM TEST: " + docid); |
|
119 |
} |
|
116 | 120 |
} |
117 | 121 |
|
118 | 122 |
// make sure the list is sorted so we can break them into sublists for the threads |
Also available in: Unified diff
use non-random list for generating system metadata in test mode