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
96059e0a
Commit
96059e0a
authored
Aug 03, 2015
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-25 Fix Atlas on Java 8 (sandeep.samudrala via shwethags)
parent
b93fe4a4
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
74 additions
and
41 deletions
+74
-41
pom.xml
pom.xml
+18
-7
release-log.txt
release-log.txt
+1
-0
GraphHelper.java
...n/java/org/apache/atlas/repository/graph/GraphHelper.java
+1
-1
EnumTest.java
...est/java/org/apache/atlas/repository/memory/EnumTest.java
+4
-4
StructTest.java
...t/java/org/apache/atlas/repository/memory/StructTest.java
+2
-2
AbstractDataType.java
...a/org/apache/atlas/typesystem/types/AbstractDataType.java
+10
-1
EnumTest.java
...test/java/org/apache/atlas/typesystem/types/EnumTest.java
+2
-2
StructTest.java
...st/java/org/apache/atlas/typesystem/types/StructTest.java
+1
-1
SerializationTest.scala
.../org/apache/atlas/typesystem/json/SerializationTest.scala
+6
-6
pom.xml
webapp/pom.xml
+29
-17
No files found.
pom.xml
View file @
96059e0a
...
...
@@ -327,7 +327,7 @@
<jackson.version>
1.8.3
</jackson.version>
<tinkerpop.version>
2.6.0
</tinkerpop.version>
<titan.version>
0.5.4
</titan.version>
<hadoop.version>
2.
6
.0
</hadoop.version>
<hadoop.version>
2.
7
.0
</hadoop.version>
<hbase.version>
0.98.9-hadoop2
</hbase.version>
<!-- scala versions -->
...
...
@@ -402,6 +402,21 @@
</properties>
</profile>
<profile>
<id>
jdk7
</id>
<activation>
<jdk>
[1.7,1.8)
</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>
org.codehaus.enunciate
</groupId>
<artifactId>
maven-enunciate-plugin
</artifactId>
<version>
1.29
</version>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>
<module>
typesystem
</module>
...
...
@@ -1192,8 +1207,9 @@
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
findbugs-maven-plugin
</artifactId>
<version>
2.5.2
</version>
<version>
3.0.1
</version>
</plugin>
<!-- Source code metrics: mvn javancss:report or mvn site -->
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
...
...
@@ -1276,11 +1292,6 @@
</configuration>
</plugin>
<plugin>
<groupId>
org.codehaus.enunciate
</groupId>
<artifactId>
maven-enunciate-plugin
</artifactId>
<version>
1.29
</version>
</plugin>
</plugins>
</pluginManagement>
...
...
release-log.txt
View file @
96059e0a
...
...
@@ -8,6 +8,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags)
ALL CHANGES:
ATLAS-25 Fix Atlas on Java 8 (sandeep.samudrala via shwethags)
ATLAS-86 Jenkins build failing as of build #41 (shwethags)
ATLAS-80 Support for variables in application properties (shwethags)
ATLAS-37 atlas repository, webapp, hive-bridge tests fails with Hbase and Solr as Titan storage backend (suma.shivaprasad via shwethags)
...
...
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
View file @
96059e0a
...
...
@@ -96,7 +96,7 @@ public final class GraphHelper {
public
static
String
vertexString
(
final
Vertex
vertex
)
{
StringBuilder
properties
=
new
StringBuilder
();
for
(
String
propertyKey
:
vertex
.
getPropertyKeys
())
{
properties
.
append
(
propertyKey
).
append
(
"="
).
append
(
vertex
.
getProperty
(
propertyKey
)).
append
(
", "
);
properties
.
append
(
propertyKey
).
append
(
"="
).
append
(
vertex
.
getProperty
(
propertyKey
)
.
toString
()
).
append
(
", "
);
}
return
"v["
+
vertex
.
getId
()
+
"], Properties["
+
properties
+
"]"
;
...
...
repository/src/test/java/org/apache/atlas/repository/memory/EnumTest.java
View file @
96059e0a
...
...
@@ -176,7 +176,7 @@ public class EnumTest extends BaseTest {
"\tl : \t"
+
TEST_DATE
+
"\n"
+
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.1, 1.1]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"\tenum4 : \tPARTITION\n"
+
"}"
);
}
...
...
@@ -208,7 +208,7 @@ public class EnumTest extends BaseTest {
"\tl : \t"
+
TEST_DATE
+
"\n"
+
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.1, 1.1]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"\tenum4 : \tPARTITION\n"
+
"}"
);
}
...
...
@@ -245,7 +245,7 @@ public class EnumTest extends BaseTest {
"\tl : \t"
+
TEST_DATE
+
"\n"
+
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.1, 1.1]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"\tenum4 : \tPARTITION\n"
+
"}"
);
}
...
...
@@ -286,7 +286,7 @@ public class EnumTest extends BaseTest {
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.100000000000000088817841970012523233890533447265625, 1"
+
".100000000000000088817841970012523233890533447265625]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"\tenum4 : \tPARTITION\n"
+
"}"
);
}
...
...
repository/src/test/java/org/apache/atlas/repository/memory/StructTest.java
View file @
96059e0a
...
...
@@ -60,7 +60,7 @@ public class StructTest extends BaseTest {
"\tl : \t"
+
TEST_DATE
+
"\n"
+
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.1, 1.1]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"}"
);
}
...
...
@@ -104,7 +104,7 @@ public class StructTest extends BaseTest {
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.100000000000000088817841970012523233890533447265625, 1"
+
".100000000000000088817841970012523233890533447265625]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"}"
);
}
...
...
typesystem/src/main/java/org/apache/atlas/typesystem/types/AbstractDataType.java
View file @
96059e0a
...
...
@@ -18,8 +18,11 @@
package
org
.
apache
.
atlas
.
typesystem
.
types
;
import
com.google.common.collect.ImmutableSortedMap
;
import
org.apache.atlas.AtlasException
;
import
java.util.Map
;
abstract
class
AbstractDataType
<
T
>
implements
IDataType
<
T
>
{
protected
T
convertNull
(
Multiplicity
m
)
throws
AtlasException
{
...
...
@@ -31,7 +34,13 @@ abstract class AbstractDataType<T> implements IDataType<T> {
@Override
public
void
output
(
T
val
,
Appendable
buf
,
String
prefix
)
throws
AtlasException
{
TypeUtils
.
outputVal
(
val
==
null
?
"<null>"
:
val
.
toString
(),
buf
,
prefix
);
if
(
val
instanceof
Map
)
{
ImmutableSortedMap
immutableSortedMap
=
ImmutableSortedMap
.
copyOf
((
Map
)
val
);
TypeUtils
.
outputVal
(
val
==
null
?
"<null>"
:
immutableSortedMap
.
toString
(),
buf
,
prefix
);
}
else
{
TypeUtils
.
outputVal
(
val
==
null
?
"<null>"
:
val
.
toString
(),
buf
,
prefix
);
}
}
}
typesystem/src/test/java/org/apache/atlas/typesystem/types/EnumTest.java
View file @
96059e0a
...
...
@@ -162,7 +162,7 @@ public class EnumTest extends BaseTest {
"\tl : \t"
+
TEST_DATE
+
"\n"
+
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.1, 1.1]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"\tenum4 : \tPARTITION\n"
+
"}"
);
}
...
...
@@ -194,7 +194,7 @@ public class EnumTest extends BaseTest {
"\tl : \t"
+
TEST_DATE
+
"\n"
+
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.1, 1.1]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"\tenum4 : \tPARTITION\n"
+
"}"
);
}
...
...
typesystem/src/test/java/org/apache/atlas/typesystem/types/StructTest.java
View file @
96059e0a
...
...
@@ -56,7 +56,7 @@ public class StructTest extends BaseTest {
"\tl : \t"
+
TEST_DATE
+
"\n"
+
"\tm : \t[1, 1]\n"
+
"\tn : \t[1.1, 1.1]\n"
+
"\to : \t{
b=2.0, a=1
.0}\n"
+
"\to : \t{
a=1.0, b=2
.0}\n"
+
"}"
);
}
...
...
typesystem/src/test/scala/org/apache/atlas/typesystem/json/SerializationTest.scala
View file @
96059e0a
...
...
@@ -44,18 +44,18 @@ class SerializationTest extends BaseTest {
val
s
:
Struct
=
BaseTest
.
createStruct
()
val
ts
:
ITypedStruct
=
structType
.
convert
(
s
,
Multiplicity
.
REQUIRED
)
Assert
.
assertEquals
(
ts
.
toString
,
"{\n\ta : \t1\n\tb : \ttrue\n\tc : \t1\n\td : \t2\n\te : \t1\n\tf : \t1\n\tg : \t1\n\th : \t1.0\n\ti : \t1.0\n\tj : \t1\n\tk : \t1\n\tl : \t"
+
BaseTest
.
TEST_DATE
+
"\n\tm : \t[1, 1]\n\tn : \t[1.1, 1.1]\n\to : \t{
b=2.0, a=1
.0}\n}"
)
Assert
.
assertEquals
(
ts
.
toString
,
"{\n\ta : \t1\n\tb : \ttrue\n\tc : \t1\n\td : \t2\n\te : \t1\n\tf : \t1\n\tg : \t1\n\th : \t1.0\n\ti : \t1.0\n\tj : \t1\n\tk : \t1\n\tl : \t"
+
BaseTest
.
TEST_DATE
+
"\n\tm : \t[1, 1]\n\tn : \t[1.1, 1.1]\n\to : \t{
a=1.0, b=2
.0}\n}"
)
implicit
val
formats
=
org
.
json4s
.
native
.
Serialization
.
formats
(
NoTypeHints
)
+
new
TypedStructSerializer
+
new
BigDecimalSerializer
+
new
BigIntegerSerializer
//Json representation
val
ser
=
swrite
(
ts
)
Assert
.
assertEquals
(
ser
,
"{\"$typeName$\":\"t1\",\"e\":1,\"n\":[1.1,1.1],\"h\":1.0,\"b\":true,\"k\":1,\"j\":1,\"d\":2,\"m\":[1,1],\"g\":1,\"a\":1,\"i\":1.0,\"c\":1,\"l\":\""
+
BaseTest
.
TEST_DATE
+
"\",\"f\":1,\"o\":{\"b\":2.0,\"a\":1.0}}"
)
val
ser1
=
swrite
(
ts
.
toString
)
Assert
.
assertEquals
(
ser1
,
"\"{\\n\\ta : \\t1\\n\\tb : \\ttrue\\n\\tc : \\t1\\n\\td : \\t2\\n\\te : \\t1\\n\\tf : \\t1\\n\\tg : \\t1\\n\\th : \\t1.0\\n\\ti : \\t1.0\\n\\tj : \\t1\\n\\tk : \\t1\\n\\tl : \\t"
+
BaseTest
.
TEST_DATE
+
"\\n\\tm : \\t[1, 1]\\n\\tn : \\t[1.1, 1.1]\\n\\to : \\t{a=1.0, b=2.0}\\n}\""
);
// Typed Struct read back
val
ts1
=
read
[
StructInstance
](
ser
)
Assert
.
assertEquals
(
ts1
.
toString
,
"{\n\ta : \t1\n\tb : \ttrue\n\tc : \t1\n\td : \t2\n\te : \t1\n\tf : \t1\n\tg : \t1\n\th : \t1.0\n\ti : \t1.0\n\tj : \t1\n\tk : \t1\n\tl : \t"
+
BaseTest
.
TEST_DATE
+
"\n\tm : \t[1, 1]\n\tn : \t[1.100000000000000088817841970012523233890533447265625, 1.100000000000000088817841970012523233890533447265625]\n\to : \t{
b=2.0, a=1
.0}\n}"
)
Assert
.
assertEquals
(
ts1
.
toString
,
"{\n\ta : \t1\n\tb : \ttrue\n\tc : \t1\n\td : \t2\n\te : \t1\n\tf : \t1\n\tg : \t1\n\th : \t1.0\n\ti : \t1.0\n\tj : \t1\n\tk : \t1\n\tl : \t"
+
BaseTest
.
TEST_DATE
+
"\n\tm : \t[1, 1]\n\tn : \t[1.100000000000000088817841970012523233890533447265625, 1.100000000000000088817841970012523233890533447265625]\n\to : \t{
a=1.0, b=2
.0}\n}"
)
}
@Test
def
test2
{
...
...
@@ -68,9 +68,9 @@ class SerializationTest extends BaseTest {
val
ts1
=
read
[
StructInstance
](
"""
{"$typeName$":"t1","e":1,"n":[1.1,1.1],"h":1.0,"b":true,"k":1,"j":1,"d":2,"m":[1,1],"g":1,"a":1,"i":1.0,
"c":1,"l":"2014-12-03T19:38:55.053Z","f":1,"o":{"
b":2.0,"a":1
.0}}"""
)
"c":1,"l":"2014-12-03T19:38:55.053Z","f":1,"o":{"
a":1.0,"b":2
.0}}"""
)
// Typed Struct read from string
Assert
.
assertEquals
(
ts1
.
toString
,
"{\n\ta : \t1\n\tb : \ttrue\n\tc : \t1\n\td : \t2\n\te : \t1\n\tf : \t1\n\tg : \t1\n\th : \t1.0\n\ti : \t1.0\n\tj : \t1\n\tk : \t1\n\tl : \t2014-12-03T19:38:55.053Z\n\tm : \t[1, 1]\n\tn : \t[1.100000000000000088817841970012523233890533447265625, 1.100000000000000088817841970012523233890533447265625]\n\to : \t{
b=2.0, a=1
.0}\n}"
)
Assert
.
assertEquals
(
ts1
.
toString
,
"{\n\ta : \t1\n\tb : \ttrue\n\tc : \t1\n\td : \t2\n\te : \t1\n\tf : \t1\n\tg : \t1\n\th : \t1.0\n\ti : \t1.0\n\tj : \t1\n\tk : \t1\n\tl : \t2014-12-03T19:38:55.053Z\n\tm : \t[1, 1]\n\tn : \t[1.100000000000000088817841970012523233890533447265625, 1.100000000000000088817841970012523233890533447265625]\n\to : \t{
a=1.0, b=2
.0}\n}"
)
}
@Test
def
testTrait
{
...
...
webapp/pom.xml
View file @
96059e0a
...
...
@@ -38,6 +38,35 @@
<debug.jetty.daemon>
true
</debug.jetty.daemon>
</properties>
<profiles>
<profile>
<id>
jdk7
</id>
<activation>
<jdk>
[1.7,1.8)
</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>
org.codehaus.enunciate
</groupId>
<artifactId>
maven-enunciate-plugin
</artifactId>
<executions>
<execution>
<goals>
<goal>
docs
</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- the directory where to put the docs -->
<docsDir>
${project.build.directory}/apidocs
</docsDir>
<configFile>
${basedir}/../src/build/enunciate.xml
</configFile>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>
org.apache.atlas
</groupId>
...
...
@@ -278,23 +307,6 @@
</plugin>
<plugin>
<groupId>
org.codehaus.enunciate
</groupId>
<artifactId>
maven-enunciate-plugin
</artifactId>
<executions>
<execution>
<goals>
<goal>
docs
</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- the directory where to put the docs -->
<docsDir>
${project.build.directory}/apidocs
</docsDir>
<configFile>
${basedir}/../src/build/enunciate.xml
</configFile>
</configuration>
</plugin>
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
keytool-maven-plugin
</artifactId>
<executions>
...
...
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