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
4119f431
Commit
4119f431
authored
7 years ago
by
rmani
Committed by
Madhan Neethiraj
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2445: updated HBase hook to handle table-clone and snapshot-restore operations
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
a0c85e5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
HBaseAtlasCoprocessor.java
...va/org/apache/atlas/hbase/hook/HBaseAtlasCoprocessor.java
+25
-0
No files found.
addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/hook/HBaseAtlasCoprocessor.java
View file @
4119f431
...
...
@@ -27,6 +27,7 @@ import org.apache.hadoop.hbase.TableName;
import
org.apache.hadoop.hbase.NamespaceDescriptor
;
import
org.apache.hadoop.hbase.coprocessor.MasterCoprocessorEnvironment
;
import
org.apache.hadoop.hbase.coprocessor.ObserverContext
;
import
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos
;
import
org.apache.hadoop.hbase.util.Bytes
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -149,6 +150,30 @@ public class HBaseAtlasCoprocessor extends HBaseAtlasCoprocessorBase {
LOG
.
debug
(
"<== HBaseAtlasCoprocessor.postModifyNamespace()"
);
}
}
@Override
public
void
postCloneSnapshot
(
ObserverContext
<
MasterCoprocessorEnvironment
>
observerContext
,
HBaseProtos
.
SnapshotDescription
snapshotDescription
,
HTableDescriptor
hTableDescriptor
)
throws
IOException
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"==> HBaseAtlasCoprocessoror.postCloneSnapshot()"
);
}
hbaseAtlasHook
.
sendHBaseTableOperation
(
hTableDescriptor
,
null
,
HBaseAtlasHook
.
OPERATION
.
CREATE_TABLE
);
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== HBaseAtlasCoprocessoror.postCloneSnapshot()"
);
}
}
@Override
public
void
postRestoreSnapshot
(
ObserverContext
<
MasterCoprocessorEnvironment
>
observerContext
,
HBaseProtos
.
SnapshotDescription
snapshotDescription
,
HTableDescriptor
hTableDescriptor
)
throws
IOException
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"==> HBaseAtlasCoprocessor.postRestoreSnapshot()"
);
}
hbaseAtlasHook
.
sendHBaseTableOperation
(
hTableDescriptor
,
hTableDescriptor
.
getTableName
(),
HBaseAtlasHook
.
OPERATION
.
ALTER_TABLE
);
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== HBaseAtlasCoprocessor.postRestoreSnapshot()"
);
}
}
}
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