Revision 7319
Added by Chris Jones over 12 years ago
src/edu/ucsb/nceas/metacat/dataone/hazelcast/ObjectPathMap.java | ||
---|---|---|
9 | 9 |
import java.util.Map; |
10 | 10 |
import java.util.Set; |
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
12 | 13 |
import org.dataone.service.types.v1.Identifier; |
13 | 14 |
import org.jibx.runtime.JiBXException; |
14 | 15 |
import org.xml.sax.SAXException; |
... | ... | |
43 | 44 |
private static IdentifierManager im; |
44 | 45 |
private static String dataPath; |
45 | 46 |
private static String metadataPath; |
47 |
private Logger logMetacat = Logger.getLogger(ObjectPathMap.class); |
|
48 |
|
|
46 | 49 |
|
47 |
|
|
48 | 50 |
/** |
49 | 51 |
* creates an ObjectPathMap |
50 | 52 |
*/ |
... | ... | |
96 | 98 |
docid = im.getLocalId(key.getValue()); |
97 | 99 |
path = pathToDocid(docid); |
98 | 100 |
} catch (Exception e) { |
99 |
// TODO Auto-generated catch block |
|
100 |
e.printStackTrace(); |
|
101 |
return null; |
|
101 |
if (logMetacat.isDebugEnabled()) { |
|
102 |
e.printStackTrace(); |
|
103 |
} |
|
104 |
return null; |
|
102 | 105 |
} |
103 | 106 |
return path; |
104 | 107 |
} |
... | ... | |
120 | 123 |
map.put(id, pathToDocid(docid)); |
121 | 124 |
|
122 | 125 |
} catch (Exception e) { |
123 |
// TODO should the map load an empty path instead of
|
|
124 |
// leaving out the entire entry?
|
|
125 |
e.printStackTrace();
|
|
126 |
if (logMetacat.isDebugEnabled()) {
|
|
127 |
e.printStackTrace();
|
|
128 |
}
|
|
126 | 129 |
} |
127 | 130 |
} |
128 | 131 |
return map; |
Also available in: Unified diff
On the coordinating Nodes, we often get McdbDocNotFoundExceptions for data (doctype == 'BIN') documents because they are not synchronized to the CNs. Change the logging to only print the stack trace during load() and loadAll() when log debug is enabled.