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
9a4a353d
Commit
9a4a353d
authored
Mar 20, 2015
by
Harish Butani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix nested structure serialization for referenceable/struct
parent
643b6489
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
InstanceE2ETest.java
...he/hadoop/metadata/repository/memory/InstanceE2ETest.java
+1
-2
Serialization.scala
...pache/hadoop/metadata/typesystem/json/Serialization.scala
+1
-1
No files found.
repository/src/test/java/org/apache/hadoop/metadata/repository/memory/InstanceE2ETest.java
View file @
9a4a353d
...
@@ -152,7 +152,6 @@ public class InstanceE2ETest extends BaseTest {
...
@@ -152,7 +152,6 @@ public class InstanceE2ETest extends BaseTest {
Referenceable
r1
=
InstanceSerialization
$
.
MODULE
$
.
fromJsonReferenceable
(
jsonStr
,
true
);
Referenceable
r1
=
InstanceSerialization
$
.
MODULE
$
.
fromJsonReferenceable
(
jsonStr
,
true
);
ClassType
tableType
=
ts
.
getDataType
(
ClassType
.
class
,
"hive_table"
);
ClassType
tableType
=
ts
.
getDataType
(
ClassType
.
class
,
"hive_table"
);
/* todo: fix deserialization, so following conver works
ITypedReferenceableInstance
i
=
tableType
.
convert
(
r1
,
Multiplicity
.
REQUIRED
);
ITypedReferenceableInstance
i
=
tableType
.
convert
(
r1
,
Multiplicity
.
REQUIRED
);
jsonStr
=
Serialization
$
.
MODULE
$
.
toJson
(
i
);
jsonStr
=
Serialization
$
.
MODULE
$
.
toJson
(
i
);
...
@@ -160,6 +159,6 @@ public class InstanceE2ETest extends BaseTest {
...
@@ -160,6 +159,6 @@ public class InstanceE2ETest extends BaseTest {
i
=
Serialization
$
.
MODULE
$
.
fromJson
(
jsonStr
);
i
=
Serialization
$
.
MODULE
$
.
fromJson
(
jsonStr
);
System
.
out
.
println
(
i
);
System
.
out
.
println
(
i
);
*/
}
}
}
}
typesystem/src/main/scala/org/apache/hadoop/metadata/typesystem/json/Serialization.scala
View file @
9a4a353d
...
@@ -347,7 +347,7 @@ object InstanceSerialization {
...
@@ -347,7 +347,7 @@ object InstanceSerialization {
val
_formats
=
new
DefaultFormats
{
val
_formats
=
new
DefaultFormats
{
override
val
dateFormatter
=
TypeSystem
.
getInstance
().
getDateFormat
.
asInstanceOf
[
SimpleDateFormat
]
override
val
dateFormatter
=
TypeSystem
.
getInstance
().
getDateFormat
.
asInstanceOf
[
SimpleDateFormat
]
override
val
typeHints
=
NoTypeHints
override
val
typeHints
=
FullTypeHints
(
List
(
classOf
[
_
Id
],
classOf
[
_
Struct
],
classOf
[
_
Reference
]))
}
}
def
buildFormat
(
withBigDecimals
:
Boolean
)
=
{
def
buildFormat
(
withBigDecimals
:
Boolean
)
=
{
...
...
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