简体   繁体   中英

Migrate repositories and policies from xasecure to ranger

I would like to ask how to migrate repositories and policies from xasecure to ranger in HDP. I am using HDP 2.2 and was upgrading ambari from 1.7 to 2.1 then upgrading xasecure to ranger. Ranger creates new database in mysql called "ranger". If I restore my dumped database from xasecure called "xasecure" as "ranger" database I got an error when I want to edit my policies "Page not found", and from xa_portal_sql.log:

ERROR net.sf.log4jdbc.Slf4jSpyLogDelegator (Slf4jSpyLogDelegator.java:130) - 1. PreparedStatement.executeQuery() FAILED! SELECT DISTINCT ID AS a1, ADDED_BY_ID AS a2, ASSET_ID AS a3, RES_COL_FAMS AS a4, COL_TYPE AS a5, RES_COLS AS a6, CREATE_TIME AS a7, RES_DBS AS a8, DESCR AS a9, IS_ENCRYPT AS a10, IS_RECURSIVE
AS a11, RES_NAME AS a12, PARENT_ID AS a13, PARENT_PATH AS a14, POLICY_NAME AS a15, RES_GROUP AS a16, RES_STATUS AS a17, RES_TYPE AS a18, RES_SERVICES AS a19, TABLE_TYPE AS a20, RES_TABLES AS a21, RES_TOPOLOGIES AS a22, RES_UDFS AS a23, UPDATE_TIME AS a24, UPD_BY_ID AS a25 FROM x_resource WHERE ((1 = 1) AND (ASSET_ID = 1)) ORDER BY ID ASC LIMIT 0, 25 ; {FAILED after 0 msec} com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'POLICY_NAME' in 'field list'

Could somebody help me? Thank you in advance

Ok so if anybody else is facing this problem, you should add column "POLICY_NAME" to table "x_resource" and some more columns to some other tables. You will find which in xa_portal_sql.log

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM