[ 
https://issues.apache.org/jira/browse/FLINK-23361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shouzuo meng updated FLINK-23361:
---------------------------------
    Description: 
When  I use "high-availability.zookeeper.path.root",

but execute tryDeleteEmptyParentZNodes, it doesn't work,It is possible that 
there is a problem in 
org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperHaServices#isRootPath

 
{code:java}
   private void tryDeleteEmptyParentZNodes() throws Exception {
        // try to delete the parent znodes if they are empty
        String remainingPath = 
                        
getParentPath(getNormalizedPath(client.getNamespace()));       
final CuratorFramework nonNamespaceClient = client.usingNamespace(null);
        
        while (!isRootPath(remainingPath)) {
            try {
                nonNamespaceClient.delete().forPath(remainingPath);
            } catch (KeeperException.NotEmptyException ignored) {
                // We can only delete empty znodes
                break;
            }            remainingPath = getParentPath(remainingPath);
        }
    }
{code}
 
{code:java}
private static boolean isRootPath(String remainingPath) {
     return ZKPaths.PATH_SEPARATOR.equals(remainingPath);
 }{code}
when i use "high-availability.zookeeper.path.root" , remainingPath should 
equals the root path that I specified

  was:
When  I use "high-availability.zookeeper.path.root",

but execute HA, it doesn't work,It is possible that there is a problem in 
org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperHaServices#isRootPath
{code:java}
private static boolean isRootPath(String remainingPath) {
     return ZKPaths.PATH_SEPARATOR.equals(remainingPath);
 }{code}
when i use "high-availability.zookeeper.path.root" , remainingPath should 
equals the root path that I specified

        Summary: when cleanup ZooKeeper Paths, 
high-availability.zookeeper.path.root doesn't work  (was: After ZooKeeper sets 
authority, HA does not work)

> when cleanup ZooKeeper Paths, high-availability.zookeeper.path.root doesn't 
> work
> --------------------------------------------------------------------------------
>
>                 Key: FLINK-23361
>                 URL: https://issues.apache.org/jira/browse/FLINK-23361
>             Project: Flink
>          Issue Type: Bug
>          Components: flink-contrib
>    Affects Versions: 1.13.1
>         Environment: Flink 1.13.1
>            Reporter: shouzuo meng
>            Priority: Major
>              Labels: security
>             Fix For: 1.13.1
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> When  I use "high-availability.zookeeper.path.root",
> but execute tryDeleteEmptyParentZNodes, it doesn't work,It is possible that 
> there is a problem in 
> org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperHaServices#isRootPath
>  
> {code:java}
>    private void tryDeleteEmptyParentZNodes() throws Exception {
>         // try to delete the parent znodes if they are empty
>         String remainingPath = 
>                         
> getParentPath(getNormalizedPath(client.getNamespace()));       
> final CuratorFramework nonNamespaceClient = client.usingNamespace(null);
>         
>         while (!isRootPath(remainingPath)) {
>             try {
>                 nonNamespaceClient.delete().forPath(remainingPath);
>             } catch (KeeperException.NotEmptyException ignored) {
>                 // We can only delete empty znodes
>                 break;
>             }            remainingPath = getParentPath(remainingPath);
>         }
>     }
> {code}
>  
> {code:java}
> private static boolean isRootPath(String remainingPath) {
>      return ZKPaths.PATH_SEPARATOR.equals(remainingPath);
>  }{code}
> when i use "high-availability.zookeeper.path.root" , remainingPath should 
> equals the root path that I specified



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to