Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
812ee5ba
Commit
812ee5ba
authored
9 years ago
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-using getColumns() for partition keys
parent
40e0d41e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
HiveMetaStoreBridge.java
...ache/hadoop/metadata/hive/bridge/HiveMetaStoreBridge.java
+2
-14
No files found.
addons/hive-bridge/src/main/java/org/apache/hadoop/metadata/hive/bridge/HiveMetaStoreBridge.java
View file @
812ee5ba
...
...
@@ -277,20 +277,8 @@ public class HiveMetaStoreBridge {
tableRef
.
set
(
"sd"
,
sdReferenceable
);
// add reference to the Partition Keys
List
<
Referenceable
>
partKeys
=
new
ArrayList
<>();
Referenceable
colRef
;
if
(
hiveTable
.
getPartitionKeys
().
size
()
>
0
)
{
for
(
FieldSchema
fs
:
hiveTable
.
getPartitionKeys
())
{
colRef
=
new
Referenceable
(
HiveDataTypes
.
HIVE_COLUMN
.
getName
());
colRef
.
set
(
"name"
,
fs
.
getName
());
colRef
.
set
(
"type"
,
fs
.
getType
());
colRef
.
set
(
"comment"
,
fs
.
getComment
());
Referenceable
colRefTyped
=
createInstance
(
colRef
);
partKeys
.
add
(
colRefTyped
);
}
tableRef
.
set
(
"partitionKeys"
,
partKeys
);
}
List
<
Referenceable
>
partKeys
=
getColumns
(
hiveTable
.
getPartitionKeys
());;
tableRef
.
set
(
"partitionKeys"
,
partKeys
);
tableRef
.
set
(
"parameters"
,
hiveTable
.
getParameters
());
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment