helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kishore g <g.kish...@gmail.com>
Subject Re: ZkBaseDataAccessor path problem on Windows
Date Tue, 05 Mar 2013 06:43:20 GMT
Thanks Ming. I see the same problem in many other places, we should move
the fix to a util class.

 grep getParent `find . -name *.java`
./helix-core/src/main/java/org/apache/helix/manager/zk/Cache.java:
 String parentPath = new File(path).getParent();
./helix-core/src/main/java/org/apache/helix/manager/zk/WriteThroughCache.java:
   String parentPath = new File(path).getParent();
./helix-core/src/main/java/org/apache/helix/manager/zk/WriteThroughCache.java://
     String parentPath = new File(path).getParent();
./helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java:
       String parentPath = new File(path).getParent();
./helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java:
         String parentPath = new File(path).getParent();
./helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackCache.java:
   String parentPath = new File(path).getParent();
./helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackCache.java:
     String parentPath = new File(dataPath).getParent();
./helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackCache.java:
     tmpPath = new File(tmpPath).getParent();




On Mon, Mar 4, 2013 at 10:23 PM, Ming Fang <mingfang@mac.com> wrote:

> This is how I fixed it
>
> https://github.com/mingfang/apache-helix/commit/cb603f07e27989db198c2d72742ec8496c15ed02
>
> On Mar 5, 2013, at 1:22 AM, Zhen Zhang <nehzgnahz@gmail.com> wrote:
>
> Hi Ming, thanks for pointing out the problem. "new File(path).getParent()"
> is problematic on Windows platforms as the separator becomes "\". We will
> fix it. Filed a jira to track this:
>
> https://issues.apache.org/jira/browse/Helix-57
>
> Thanks,
> Jason
>
> On Mon, Mar 4, 2013 at 9:33 PM, Ming Fang <mingfang@mac.com> wrote:
>
>> I'm getting path problems on Windows.
>> Looking at line 104 and 584 of
>> org.apache.helix.manager.zk.ZkBaseDataAccessor it looks like it is mixing
>> up local file path with Zookeeper path.
>> In Zookeeper the file separator is always "/".
>> But ZkBaseDataAccessor will end up using "\" when running on Windows.
>
>
>
>

Mime
View raw message