Changeset 1450
- Timestamp:
- Nov 3, 2011, 8:52:08 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.hdfs/trunk/src/net/sf/basedb/hdfs/HdfsConnectionManager.java
r1330 r1450 22 22 package net.sf.basedb.hdfs; 23 23 24 import java.io.FileNotFoundException; 24 25 import java.io.IOException; 25 26 import java.io.InputStream; … … 82 83 if (port == -1) port = 9000; 83 84 client = createClient(uri, parameters); 84 stream = new CloseResourceInputStream(client.open(uri.getPath()), client); 85 InputStream tmp = client.open(uri.getPath()); 86 if (tmp == null) 87 { 88 throw new FileNotFoundException(uri.toString()); 89 } 90 stream = new CloseResourceInputStream(tmp, client); 85 91 } 86 92 finally … … 103 109 { 104 110 client = createClient(uri, parameters); 105 metadata = createMetadata(uri, client.getFileInfo(uri.getPath())); 111 HdfsFileStatus status = client.getFileInfo(uri.getPath()); 112 if (status == null) 113 { 114 throw new FileNotFoundException(uri.toString()); 115 } 116 metadata = createMetadata(uri, status); 106 117 } 107 118 finally
Note: See TracChangeset
for help on using the changeset viewer.