[ 
https://issues.apache.org/jira/browse/NIFI-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906345#comment-15906345
 ] 

Michael Moser commented on NIFI-3579:
-------------------------------------

Well this is not the result that I wanted, [[email protected]], 
because my machine doesn't reproduce your results.

{quote}
$ java Blah
============> C:\Users\mosermw
476.38672GB
476.38672GB
============> D:\dev
1862.8906GB
1862.8906GB

$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
2015-11-10T11:41:47-05:00)
Maven home: D:\dev\apache-maven-3.3.9
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: D:\dev\jdk1.8.0_121\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
{quote}

> Nifi Failed to Start: nio Files.getFileStore(Path) is buggy in Windows
> ----------------------------------------------------------------------
>
>                 Key: NIFI-3579
>                 URL: https://issues.apache.org/jira/browse/NIFI-3579
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.2.0, 1.1.1
>         Environment: Win 10 with Oracle JDK 1.8.0_121 on NTFS
>            Reporter: Puspendu Banerjee
>            Assignee: Puspendu Banerjee
>            Priority: Critical
>              Labels: windows
>         Attachments: nifi-app.log
>
>
> Nifi is failing to start due to IOException originating from 
> FileSystemRepository during calls to {code:java}
> Files.getFileStore(path).getTotalSpace();
> Files.getFileStore(path).getUsableSpace();
>  {code} with a read-access denied status.
> It looks like a buggy JDK implementation as on the other hand the following 
> code is yielding result:
> {code:java}
> path.toFile().getTotalSpace();
> path.toFile().getUsableSpace();
> {code}
> Interestingly, the both of the codes are yielding same results for C:\ or 
> System Drive.
> *sample*
> {code:java}
> import java.io.File;
> import java.io.IOException;
> import java.nio.file.Files;
> import java.nio.file.Path;
> import java.nio.file.Paths;
> import java.util.Arrays;
> import static java.lang.System.out;
> public class Blah {
>     public static void main(String [] args) throws IOException{
>         String [] _paths= {"D:\\workspace\\nifi", "c:\\Program Files"};
>         final float divisor=1024 * 1024 * 1024f;
>         for(String _path : _paths) {
>             try {
>                 Path path = Paths.get(_path);
>                 out.println(path.toFile().getTotalSpace() /divisor  + "GB");
>                 out.println(Files.getFileStore(path).getTotalSpace()/divisor 
> +"GB");
>             }catch (Exception ex){
>                 ex.printStackTrace();
>             }
>         }
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to