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
eff6c6ef
Commit
eff6c6ef
authored
Jun 04, 2015
by
Suma Shivaprasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed individual index commits
parent
74726668
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
GraphTransactionInterceptor.java
...g/apache/hadoop/metadata/GraphTransactionInterceptor.java
+2
-0
GraphBackedSearchIndexer.java
...p/metadata/repository/graph/GraphBackedSearchIndexer.java
+0
-7
No files found.
repository/src/main/java/org/apache/hadoop/metadata/GraphTransactionInterceptor.java
View file @
eff6c6ef
...
@@ -40,10 +40,12 @@ public class GraphTransactionInterceptor implements MethodInterceptor {
...
@@ -40,10 +40,12 @@ public class GraphTransactionInterceptor implements MethodInterceptor {
try
{
try
{
Object
response
=
invocation
.
proceed
();
Object
response
=
invocation
.
proceed
();
titanGraph
.
commit
();
titanGraph
.
commit
();
titanGraph
.
getManagementSystem
().
commit
();
LOG
.
debug
(
"graph commit"
);
LOG
.
debug
(
"graph commit"
);
return
response
;
return
response
;
}
catch
(
Throwable
t
){
}
catch
(
Throwable
t
){
titanGraph
.
rollback
();
titanGraph
.
rollback
();
titanGraph
.
getManagementSystem
().
rollback
();
LOG
.
debug
(
"graph rollback"
);
LOG
.
debug
(
"graph rollback"
);
throw
t
;
throw
t
;
}
}
...
...
repository/src/main/java/org/apache/hadoop/metadata/repository/graph/GraphBackedSearchIndexer.java
View file @
eff6c6ef
...
@@ -83,7 +83,6 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
...
@@ -83,7 +83,6 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
.
buildMixedIndex
(
Constants
.
BACKING_INDEX
);
.
buildMixedIndex
(
Constants
.
BACKING_INDEX
);
management
.
buildIndex
(
Constants
.
EDGE_INDEX
,
Edge
.
class
)
management
.
buildIndex
(
Constants
.
EDGE_INDEX
,
Edge
.
class
)
.
buildMixedIndex
(
Constants
.
BACKING_INDEX
);
.
buildMixedIndex
(
Constants
.
BACKING_INDEX
);
management
.
commit
();
// create a composite index for guid as its unique
// create a composite index for guid as its unique
createCompositeIndex
(
Constants
.
GUID_INDEX
,
createCompositeIndex
(
Constants
.
GUID_INDEX
,
...
@@ -119,7 +118,6 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
...
@@ -119,7 +118,6 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
management
.
buildIndex
(
Constants
.
FULLTEXT_INDEX
,
Vertex
.
class
)
management
.
buildIndex
(
Constants
.
FULLTEXT_INDEX
,
Vertex
.
class
)
.
addKey
(
fullText
,
com
.
thinkaurelius
.
titan
.
core
.
schema
.
Parameter
.
of
(
"mapping"
,
Mapping
.
TEXT
))
.
addKey
(
fullText
,
com
.
thinkaurelius
.
titan
.
core
.
schema
.
Parameter
.
of
(
"mapping"
,
Mapping
.
TEXT
))
.
buildMixedIndex
(
Constants
.
BACKING_INDEX
);
.
buildMixedIndex
(
Constants
.
BACKING_INDEX
);
management
.
commit
();
LOG
.
info
(
"Created mixed index for {}"
,
Constants
.
ENTITY_TEXT_PROPERTY_KEY
);
LOG
.
info
(
"Created mixed index for {}"
,
Constants
.
ENTITY_TEXT_PROPERTY_KEY
);
}
}
...
@@ -302,8 +300,6 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
...
@@ -302,8 +300,6 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
}
}
indexBuilder
.
buildCompositeIndex
();
indexBuilder
.
buildCompositeIndex
();
management
.
commit
();
LOG
.
info
(
"Created index for property {} in composite index {}"
,
propertyName
,
indexName
);
LOG
.
info
(
"Created index for property {} in composite index {}"
,
propertyName
,
indexName
);
}
}
...
@@ -323,12 +319,10 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
...
@@ -323,12 +319,10 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
if
(
propertyClass
==
Boolean
.
class
)
{
if
(
propertyClass
==
Boolean
.
class
)
{
//Use standard index as backing index only supports string, int and geo types
//Use standard index as backing index only supports string, int and geo types
management
.
buildIndex
(
propertyName
,
Vertex
.
class
).
addKey
(
propertyKey
).
buildCompositeIndex
();
management
.
buildIndex
(
propertyName
,
Vertex
.
class
).
addKey
(
propertyKey
).
buildCompositeIndex
();
management
.
commit
();
}
else
{
}
else
{
//Use backing index
//Use backing index
TitanGraphIndex
vertexIndex
=
management
.
getGraphIndex
(
Constants
.
VERTEX_INDEX
);
TitanGraphIndex
vertexIndex
=
management
.
getGraphIndex
(
Constants
.
VERTEX_INDEX
);
management
.
addIndexKey
(
vertexIndex
,
propertyKey
);
management
.
addIndexKey
(
vertexIndex
,
propertyKey
);
management
.
commit
();
}
}
LOG
.
info
(
"Created mixed vertex index for property {}"
,
propertyName
);
LOG
.
info
(
"Created mixed vertex index for property {}"
,
propertyName
);
}
}
...
@@ -343,7 +337,6 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
...
@@ -343,7 +337,6 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
if (edgeLabel == null) {
if (edgeLabel == null) {
edgeLabel = management.makeEdgeLabel(propertyName).make();
edgeLabel = management.makeEdgeLabel(propertyName).make();
management.buildEdgeIndex(edgeLabel, propertyName, Direction.BOTH, Order.DEFAULT);
management.buildEdgeIndex(edgeLabel, propertyName, Direction.BOTH, Order.DEFAULT);
management.commit();
LOG.info("Created index for edge label {}", propertyName);
LOG.info("Created index for edge label {}", propertyName);
}
}
} */
} */
...
...
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