You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2022/12/24 15:27:26 UTC
[GitHub] [storm] skysiders opened a new pull request, #3506: STORM-3888 HdfsBlobStoreFile set wrong permission for file
skysiders opened a new pull request, #3506:
URL: https://github.com/apache/storm/pull/3506
```java
public OutputStream getOutputStream() throws IOException {
FsPermission fileperms = new FsPermission(BLOBSTORE_FILE_PERMISSION);
try {
out = fileSystem.create(path, (short) this.getMetadata().get_replication_factor());
fileSystem.setPermission(path, fileperms);
fileSystem.setReplication(path, (short) this.getMetadata().get_replication_factor());
} catch (IOException e) {
......
out = fileSystem.create(path, (short) this.getMetadata().get_replication_factor());
fileSystem.setPermission(path, dirperms);
fileSystem.setReplication(path, (short) this.getMetadata().get_replication_factor());
}
......
}
```
We can see that there are permission settings for path in both try and catch, but the permission in catch is different from that in try. In catch, the permission `dirperms` is given to the file. I think there is a problem here, and it should be the same as The permissions in try are consistent.
Permissions should be set according to the following code
```java
public OutputStream getOutputStream() throws IOException {
FsPermission fileperms = new FsPermission(BLOBSTORE_FILE_PERMISSION);
try {
out = fileSystem.create(path, (short) this.getMetadata().get_replication_factor());
fileSystem.setPermission(path, fileperms);
fileSystem.setReplication(path, (short) this.getMetadata().get_replication_factor());
} catch (IOException e) {
......
out = fileSystem.create(path, (short) this.getMetadata().get_replication_factor());
fileSystem.setPermission(path, fileperms);
fileSystem.setReplication(path, (short) this.getMetadata().get_replication_factor());
}
......
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@storm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [storm] skysiders commented on pull request #3506: STORM-3888 HdfsBlobStoreFile set wrong permission for file
Posted by GitBox <gi...@apache.org>.
skysiders commented on PR #3506:
URL: https://github.com/apache/storm/pull/3506#issuecomment-1375017907
Hi @bipinprasad , could you please have a look at this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@storm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [storm] rzo1 commented on pull request #3506: STORM-3888 HdfsBlobStoreFile set wrong permission for file
Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #3506:
URL: https://github.com/apache/storm/pull/3506#issuecomment-1486254715
@skysiders can you rebase?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@storm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] STORM-3888 HdfsBlobStoreFile set wrong permission for file (storm)
Posted by "jnioche (via GitHub)" <gi...@apache.org>.
jnioche merged PR #3506:
URL: https://github.com/apache/storm/pull/3506
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@storm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org