Skip to content
This repository was archived by the owner on Apr 19, 2022. It is now read-only.

python snakebite module dosen't handle special character #251

@hackaholic

Description

@hackaholic

On below directories when snakebite python module tries to do ls recursively it, returns no such file or directory.


mybox]$ hdfs dfs -ls /data/tdc/dv1/corp/base/dpp/raw/load_date=2018-05-01/ | grep Tenant
drwxr-xr-x   - tdcdv1r tdcdv1c          0 2018-05-01 18:28 /data/tdc/dv1/corp/base/dpp/raw/load_date=2018-05-01/rtng_ky=Access.NBNOrder.Amend.Info.{Tenant}.Rejected.v2.event
drwxr-xr-x   - tdcdv1r tdcdv1c          0 2018-05-01 15:35 /data/tdc/dv1/corp/base/dpp/raw/load_date=2018-05-01/rtng_ky=Access.NBNOrder.Amend.Info.{Tenant}.v2.event

I know its due to {} special character but snakebite is not able to handle it, does any one have any solution for this problem?.

Below is the python code:

from snakebite.client import HAClient
from snakebite.namenode import Namenode
name_node_list = [Namenode('namenode-01.localhost.com', 8020),
Namenode('namenode-02.localhost.com', 8020)]
hdfs_namenode_principal = 'nn/[email protected]'
client = HAClient(name_node_list, use_trash=False, use_sasl=True, hdfs_namenode_principal=hdfs_namenode_principal)
for x in client.ls([path], recurse=True):
    print x

I have also posted the same on stackoverflow: https://stackoverflow.com/questions/50733649/python-snakebite-module-ls-return-error-no-such-file-or-directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions