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
a0a3c318
Commit
a0a3c318
authored
Nov 13, 2020
by
Ashutosh Mestry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-4015: Add Re-indexing as JAVA_PATCH. Part 2
parent
06106fe9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
AtlasConfiguration.java
intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
+1
-1
ReIndexPatch.java
...ava/org/apache/atlas/repository/patches/ReIndexPatch.java
+8
-6
No files found.
intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
View file @
a0a3c318
...
...
@@ -74,7 +74,7 @@ public enum AtlasConfiguration {
HTTP_HEADER_SERVER_VALUE
(
"atlas.http.header.server.value"
,
"Apache Atlas"
),
STORAGE_CONSISTENCY_LOCK_ENABLED
(
"atlas.graph.storage.consistency-lock.enabled"
,
true
),
RE
INDEX_PATCH_ENABLED
(
"atlas.patch.reindex.enabled
"
,
false
);
RE
BUILD_INDEX
(
"atlas.rebuild.index
"
,
false
);
private
static
final
Configuration
APPLICATION_PROPERTIES
;
...
...
repository/src/main/java/org/apache/atlas/repository/patches/ReIndexPatch.java
View file @
a0a3c318
...
...
@@ -23,6 +23,7 @@ import org.apache.atlas.pc.WorkItemBuilder;
import
org.apache.atlas.pc.WorkItemConsumer
;
import
org.apache.atlas.pc.WorkItemManager
;
import
org.apache.atlas.repository.Constants
;
import
org.apache.atlas.repository.graphdb.AtlasEdge
;
import
org.apache.atlas.repository.graphdb.AtlasElement
;
import
org.apache.atlas.repository.graphdb.AtlasGraph
;
import
org.apache.atlas.repository.graphdb.AtlasVertex
;
...
...
@@ -53,7 +54,8 @@ public class ReIndexPatch extends AtlasPatchHandler {
@Override
public
void
apply
()
throws
AtlasBaseException
{
if
(
AtlasConfiguration
.
REINDEX_PATCH_ENABLED
.
getBoolean
()
==
false
)
{
if
(
AtlasConfiguration
.
REBUILD_INDEX
.
getBoolean
()
==
false
)
{
LOG
.
info
(
"ReIndexPatch: Skipped, since not enabled!"
);
return
;
}
...
...
@@ -113,8 +115,8 @@ public class ReIndexPatch extends AtlasPatchHandler {
}
private
static
void
edges
(
WorkItemManager
manager
,
AtlasGraph
graph
)
{
Iterable
<
Object
>
iterable
=
graph
.
getEdges
();
for
(
Iterator
<
Object
>
iter
=
iterable
.
iterator
();
iter
.
hasNext
();
)
{
Iterable
<
AtlasEdge
>
iterable
=
graph
.
getEdges
();
for
(
Iterator
<
AtlasEdge
>
iter
=
iterable
.
iterator
();
iter
.
hasNext
();
)
{
manager
.
checkProduce
(
iter
.
next
());
}
}
...
...
@@ -144,9 +146,9 @@ public class ReIndexPatch extends AtlasPatchHandler {
}
private
static
class
ReindexConsumer
extends
WorkItemConsumer
<
AtlasElement
>
{
private
List
<
AtlasElement
>
list
=
new
ArrayList
();
private
AtlasGraph
graph
;
private
String
[]
indexNames
;
private
final
List
<
AtlasElement
>
list
=
new
ArrayList
();
private
final
String
[]
indexNames
;
private
final
AtlasGraph
graph
;
private
final
AtomicLong
counter
;
public
ReindexConsumer
(
BlockingQueue
queue
,
AtlasGraph
graph
,
String
[]
indexNames
)
{
...
...
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