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
8eb9c956
Commit
8eb9c956
authored
7 years ago
by
ashutoshm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2134: Code Improvements.
parent
1dc7f549
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
ZipSource.java
...in/java/org/apache/atlas/repository/impexp/ZipSource.java
+1
-1
GraphPersistenceStrategies.scala
...a/org/apache/atlas/query/GraphPersistenceStrategies.scala
+2
-0
QueryParser.scala
...y/src/main/scala/org/apache/atlas/query/QueryParser.scala
+10
-7
No files found.
repository/src/main/java/org/apache/atlas/repository/impexp/ZipSource.java
View file @
8eb9c956
...
@@ -175,7 +175,7 @@ public class ZipSource implements EntityImportStream {
...
@@ -175,7 +175,7 @@ public class ZipSource implements EntityImportStream {
currentPosition
++;
currentPosition
++;
return
getEntityWithExtInfo
(
this
.
iterator
.
next
());
return
getEntityWithExtInfo
(
this
.
iterator
.
next
());
}
catch
(
AtlasBaseException
e
)
{
}
catch
(
AtlasBaseException
e
)
{
e
.
printStackTrace
(
);
LOG
.
error
(
"getNextEntityWithExtInfo"
,
e
);
return
null
;
return
null
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
repository/src/main/scala/org/apache/atlas/query/GraphPersistenceStrategies.scala
View file @
8eb9c956
...
@@ -284,6 +284,8 @@ case class GraphPersistenceStrategy1(g: AtlasGraph[_,_]) extends GraphPersistenc
...
@@ -284,6 +284,8 @@ case class GraphPersistenceStrategy1(g: AtlasGraph[_,_]) extends GraphPersistenc
case
DataTypes
.
TypeCategory
.
TRAIT
=>
case
DataTypes
.
TypeCategory
.
TRAIT
=>
throw
new
UnsupportedOperationException
(
s
"load for ${aInfo.dataType()} not supported"
)
throw
new
UnsupportedOperationException
(
s
"load for ${aInfo.dataType()} not supported"
)
case
DataTypes
.
TypeCategory
.
CLASS
=>
loadStructAttribute
(
dataType
,
aInfo
,
i
,
v
)
case
DataTypes
.
TypeCategory
.
CLASS
=>
loadStructAttribute
(
dataType
,
aInfo
,
i
,
v
)
case
DataTypes
.
TypeCategory
.
RELATIONSHIP
=>
throw
new
UnsupportedOperationException
(
s
"load for ${aInfo.dataType()} not supported"
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
repository/src/main/scala/org/apache/atlas/query/QueryParser.scala
View file @
8eb9c956
...
@@ -233,6 +233,7 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
...
@@ -233,6 +233,7 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
def
querySrc
:
Parser
[
Expression
]
=
rep1sep
(
singleQrySrc
,
opt
(
COMMA
))
^^
{
l
=>
l
match
{
def
querySrc
:
Parser
[
Expression
]
=
rep1sep
(
singleQrySrc
,
opt
(
COMMA
))
^^
{
l
=>
l
match
{
case
h
::
Nil
=>
h
case
h
::
Nil
=>
h
case
h
::
t
=>
t
.
foldLeft
(
h
)(
merge
(
_
,
_
))
case
h
::
t
=>
t
.
foldLeft
(
h
)(
merge
(
_
,
_
))
case
Nil
=>
null
}
}
}
}
...
@@ -277,21 +278,21 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
...
@@ -277,21 +278,21 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
case
o
~
odr
~
None
=>
(
odr
,
true
)
case
o
~
odr
~
None
=>
(
odr
,
true
)
case
o
~
odr
~
asc
=>
(
odr
,
asc
.
get
)
case
o
~
odr
~
asc
=>
(
odr
,
asc
.
get
)
}
}
def
limitOffset
:
Parser
[(
Int
,
Int
)]
=
LIMIT
~
lmt
~
opt
(
offset
)
^^
{
def
limitOffset
:
Parser
[(
Int
,
Int
)]
=
LIMIT
~
lmt
~
opt
(
offset
)
^^
{
case
l
~
lt
~
None
=>
(
lt
.
toInt
,
0
)
case
l
~
lt
~
None
=>
(
lt
.
toInt
,
0
)
case
l
~
lt
~
of
=>
(
lt
.
toInt
,
of
.
get
.
toInt
)
case
l
~
lt
~
of
=>
(
lt
.
toInt
,
of
.
get
.
toInt
)
}
}
def
offset
=
OFFSET
~
ofset
^^
{
def
offset
=
OFFSET
~
ofset
^^
{
case
offset
~
of
=>
of
case
offset
~
of
=>
of
}
}
def
asce
=
asc
^^
{
def
asce
=
asc
^^
{
case
DESC
=>
false
case
DESC
=>
false
case
_
=>
true
case
_
=>
true
}
}
def
loopExpression
(
implicit
queryParams
:
QueryParams
)
:
Parser
[(
Expression
,
Option
[
Literal
[
Integer
]]
,
Option
[
String
])]
=
def
loopExpression
(
implicit
queryParams
:
QueryParams
)
:
Parser
[(
Expression
,
Option
[
Literal
[
Integer
]]
,
Option
[
String
])]
=
LOOP
~
(
LPAREN
~>
query
<~
RPAREN
)
~
opt
(
intConstant
<~
TIMES
)
~
opt
(
AS
~>
alias
)
^^
{
LOOP
~
(
LPAREN
~>
query
<~
RPAREN
)
~
opt
(
intConstant
<~
TIMES
)
~
opt
(
AS
~>
alias
)
^^
{
case
l
~
e
~
None
~
a
=>
(
e
,
None
,
a
)
case
l
~
e
~
None
~
a
=>
(
e
,
None
,
a
)
...
@@ -361,17 +362,19 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
...
@@ -361,17 +362,19 @@ object QueryParser extends StandardTokenParsers with QueryKeywords with Expressi
case
h
::
t
=>
{
//the left-most part of the identifier (h) can be
case
h
::
t
=>
{
//the left-most part of the identifier (h) can be
t
.
foldLeft
(
id
(
h
).
asInstanceOf
[
Expression
])(
_
.
field
(
_
))
t
.
foldLeft
(
id
(
h
).
asInstanceOf
[
Expression
])(
_
.
field
(
_
))
}
}
case
Nil
=>
null
}
}
}
}
def
alias
=
ident
|
stringLit
def
alias
=
ident
|
stringLit
def
lmt
=
intConstant
def
lmt
=
intConstant
def
ofset
=
intConstant
def
ofset
=
intConstant
def
asc
=
ident
|
stringLit
def
asc
=
ident
|
stringLit
def
literal
=
booleanConstant
^^
{
def
literal
=
booleanConstant
^^
{
boolean
(
_
)
boolean
(
_
)
}
|
}
|
...
...
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