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
882c40fa
Commit
882c40fa
authored
Jan 21, 2015
by
Harish Butani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issues in StructStore uncovered by HiveImporter
parent
1f7fe941
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
AttributeStores.java
...pache/hadoop/metadata/storage/memory/AttributeStores.java
+1
-3
StructStore.java
...rg/apache/hadoop/metadata/storage/memory/StructStore.java
+5
-2
No files found.
typesystem/src/main/java/org/apache/hadoop/metadata/storage/memory/AttributeStores.java
View file @
882c40fa
...
...
@@ -156,8 +156,7 @@ public class AttributeStores {
String
attrName
=
attrNames
.
get
(
0
);
int
nullPos
=
instance
.
fieldMapping
().
fieldNullPos
.
get
(
attrName
);
int
colPos
=
instance
.
fieldMapping
().
fieldPos
.
get
(
attrName
);
System
.
out
.
println
(
"Storing attribute "
+
attrName
+
" at pos "
+
pos
+
" colPos = "
+
colPos
+
"nullPos = "
+
nullPos
);
nullList
.
set
(
pos
,
instance
.
nullFlags
[
nullPos
]);
if
(
pos
==
nullList
.
size
())
{
nullList
.
add
(
instance
.
nullFlags
[
nullPos
]);
...
...
@@ -176,7 +175,6 @@ public class AttributeStores {
public
void
load
(
int
pos
,
IConstructableType
type
,
StructInstance
instance
)
throws
RepositoryException
{
List
<
String
>
attrNames
=
type
.
getNames
(
attrInfo
);
String
attrName
=
attrNames
.
get
(
0
);
System
.
out
.
println
(
"Loading attribute "
+
attrName
);
int
nullPos
=
instance
.
fieldMapping
().
fieldNullPos
.
get
(
attrName
);
int
colPos
=
instance
.
fieldMapping
().
fieldPos
.
get
(
attrName
);
...
...
typesystem/src/main/java/org/apache/hadoop/metadata/storage/memory/StructStore.java
View file @
882c40fa
...
...
@@ -21,6 +21,7 @@ package org.apache.hadoop.metadata.storage.memory;
import
com.google.common.collect.ImmutableBiMap
;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableMap
;
import
org.apache.hadoop.metadata.ITypedStruct
;
import
org.apache.hadoop.metadata.MetadataException
;
import
org.apache.hadoop.metadata.storage.RepositoryException
;
import
org.apache.hadoop.metadata.storage.StructInstance
;
...
...
@@ -67,9 +68,11 @@ public class StructStore extends AttributeStores.AbstractAttributeStore implemen
@Override
protected
void
load
(
StructInstance
instance
,
int
colPos
,
int
pos
)
throws
RepositoryException
{
StructInstance
s
=
(
StructInstance
)
structType
.
createInstance
();
instance
.
structs
[
colPos
]
=
s
;
for
(
Map
.
Entry
<
AttributeInfo
,
IAttributeStore
>
e
:
attrStores
.
entrySet
())
{
IAttributeStore
attributeStore
=
e
.
getValue
();
attributeStore
.
load
(
pos
,
structType
,
instance
);
attributeStore
.
load
(
pos
,
structType
,
s
);
}
}
...
...
@@ -89,7 +92,7 @@ public class StructStore extends AttributeStores.AbstractAttributeStore implemen
IAttributeStore
attributeStore
=
e
.
getValue
();
attributeStore
.
ensureCapacity
(
pos
);
}
nullList
.
ensureCapacity
(
pos
);
nullList
.
size
(
pos
+
1
);
}
}
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