HCFS: avoid verbose file not found exception stack trace

This commit is contained in:
Chris Lu 2019-09-01 21:40:26 -07:00
parent af8b413a9c
commit 60c9215a00
7 changed files with 9 additions and 6 deletions

View file

@ -4,7 +4,7 @@
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
<parent>
<groupId>org.sonatype.oss</groupId>

View file

@ -194,6 +194,9 @@ public class FilerClient {
.build()).getEntry();
return fixEntryAfterReading(entry);
} catch (Exception e) {
if (e.getMessage().indexOf("filer: no entry is found in filer store")>0){
return null;
}
LOG.warn("lookupEntry {}/{}: {}", directory, entryName, e);
return null;
}

View file

@ -123,7 +123,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
<seaweedfs.client.version>1.1.3</seaweedfs.client.version>
<seaweedfs.client.version>1.1.5</seaweedfs.client.version>
<hadoop.version>2.9.2</hadoop.version>
</properties>
</project>

View file

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<properties>
<seaweedfs.client.version>1.1.3</seaweedfs.client.version>
<seaweedfs.client.version>1.1.5</seaweedfs.client.version>
<hadoop.version>2.9.2</hadoop.version>
</properties>

View file

@ -123,7 +123,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
<seaweedfs.client.version>1.1.3</seaweedfs.client.version>
<seaweedfs.client.version>1.1.5</seaweedfs.client.version>
<hadoop.version>3.1.1</hadoop.version>
</properties>
</project>

View file

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<properties>
<seaweedfs.client.version>1.1.3</seaweedfs.client.version>
<seaweedfs.client.version>1.1.5</seaweedfs.client.version>
<hadoop.version>3.1.1</hadoop.version>
</properties>

View file

@ -20,7 +20,7 @@ func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.L
entry, err := fs.filer.FindEntry(ctx, filer2.FullPath(filepath.ToSlash(filepath.Join(req.Directory, req.Name))))
if err != nil {
return nil, fmt.Errorf("%s not found under %s: %v", req.Name, req.Directory, err)
return nil, err
}
return &filer_pb.LookupDirectoryEntryResponse{