Skip to content

Commit

Permalink
ignore rootfs in sys.nodes.fs
Browse files Browse the repository at this point in the history
  • Loading branch information
msbt committed Nov 13, 2014
1 parent 375e733 commit 20dd295
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Changes for Crate
Unreleased
==========

- Fix: do not consider rootfs on linux in ``sys.nodes.fs``

- Added Support for Column Policies, which can be used to define
if a table enforces its defined schema or if it's allowed
to store additional columns which are not defined in the schema.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

public class FileSystems {

private final static IntSet supportedFSTypes = IntOpenHashSet.from(
FileSystem.TYPE_LOCAL_DISK, FileSystem.TYPE_NETWORK, FileSystem.TYPE_RAM_DISK);
private final static IntSet SUPPORTED_FS_TYPES = IntOpenHashSet.from(
FileSystem.TYPE_LOCAL_DISK, FileSystem.TYPE_NETWORK);

public final static Predicate<FileSystem> SUPPORTED_FS_TYPE = new Predicate<FileSystem>() {
@Override
public boolean apply(@Nullable FileSystem input) {
return (input != null && supportedFSTypes.contains(input.getType()));
return (input != null && SUPPORTED_FS_TYPES.contains(input.getType()));
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected List<SysObjectReference> getChildImplementations() {
FileSystem[] fileSystems = sigarService.sigar().getFileSystemList();
diskRefs = new ArrayList<>(fileSystems.length);
for (FileSystem fs : fileSystems) {
if (! FileSystems.SUPPORTED_FS_TYPE.apply(fs)) {
if (!FileSystems.SUPPORTED_FS_TYPE.apply(fs)) {
continue;
}
try {
Expand Down

0 comments on commit 20dd295

Please sign in to comment.