forked from apache/incubator-pegasus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SKV-748][SD] add hdfs dir when run build_package.sh
- Loading branch information
Showing
4 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#! /usr/bin/env python3 | ||
# coding=utf-8 | ||
|
||
# 用于获取HDFS的连接信息,即 core-site.xml 和 hdfs-site.xml 的路径 | ||
|
||
import os | ||
import sys | ||
|
||
sys.path.append(os.path.join(os.environ['SKV_HOME'], 'pynest')) | ||
from pyguidance.hadoop_config.GuidanceHadoopConfig import get_access_conf | ||
|
||
# 对应为 skv_ecosystem 库中 construction_blueprint/blueprint_2_1/declarative_desc/platform_resources.yaml 申请的资源 | ||
resource_owner = 'skv' | ||
resource_name = 'skv_backup' | ||
os.environ['SSDT_SYS_PRODUCT_COMPONENT_NAME'] = 'skv' | ||
os.environ['SSDT_SYS_MODULE_NAME'] = 'skv_offline' | ||
|
||
# 返回HDFS的连接信息 | ||
print(get_access_conf(resource_owner, resource_name, 'hdfs_dir')['access_conf']['connection_info']['conf_path']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters