Revision 7005
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/admin/upgrade/dataone/GenerateSystemMetadata.java | ||
---|---|---|
101 | 101 |
|
102 | 102 |
// get list of ALL docids at ALL server locations |
103 | 103 |
List<String> idList = DBUtil.getAllDocidsByType(null, true, serverLocation); |
104 |
Collections.sort(idList); |
|
105 | 104 |
|
106 |
// for testing, subset to a limited number |
|
107 |
idList = idList.subList(0, Math.min(idList.size(), 100)); |
|
105 |
// for testing, subset to a limited random number |
|
106 |
boolean test = true; |
|
107 |
if (test) { |
|
108 |
int limit = Math.min(idList.size(), 100); |
|
109 |
Collections.shuffle(idList); |
|
110 |
idList = idList.subList(0, limit); |
|
111 |
log.debug("limiting list to: " + limit); |
|
112 |
} |
|
108 | 113 |
|
114 |
Collections.sort(idList); |
|
115 |
|
|
109 | 116 |
// executor |
110 | 117 |
int availableProcessors = Runtime.getRuntime().availableProcessors(); |
111 | 118 |
int nThreads = availableProcessors * 1; |
Also available in: Unified diff
for testing: limit and randomize the docs to generate metadata for