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
27a39063
Commit
27a39063
authored
Nov 06, 2015
by
Suma Shivaprasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-257 import_hive.sh fails when run under cygwin(dkantor via sumasai)
parent
aafc06c4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
14 deletions
+33
-14
import-hive.sh
addons/hive-bridge/src/bin/import-hive.sh
+32
-14
release-log.txt
release-log.txt
+1
-0
No files found.
addons/hive-bridge/src/bin/import-hive.sh
View file @
27a39063
...
...
@@ -16,6 +16,8 @@
# resolve links - $0 may be a softlink
PRG
=
"
${
0
}
"
[[
`
uname
-s
`
==
*
"CYGWIN"
*
]]
&&
CYGWIN
=
true
while
[
-h
"
${
PRG
}
"
]
;
do
ls
=
`
ls
-ld
"
${
PRG
}
"
`
link
=
`
expr
"
$ls
"
:
'.*-> \(.*\)$'
`
...
...
@@ -38,21 +40,23 @@ if [ -f "${METADATA_CONF}/atlas-env.sh" ]; then
.
"
${
METADATA_CONF
}
/atlas-env.sh"
fi
if
test
-z
${
JAVA_HOME
}
if
test
-z
"
${
JAVA_HOME
}
"
then
JAVA_BIN
=
`
which java
`
JAR_BIN
=
`
which jar
`
else
JAVA_BIN
=
${
JAVA_HOME
}
/bin/java
JAR_BIN
=
${
JAVA_HOME
}
/bin/jar
JAVA_BIN
=
"
${
JAVA_HOME
}
/bin/java"
JAR_BIN
=
"
${
JAVA_HOME
}
/bin/jar"
fi
export
JAVA_BIN
if
[
!
-e
$JAVA_BIN
]
||
[
!
-e
$JAR_BIN
]
;
then
if
[
!
-e
"
${
JAVA_BIN
}
"
]
||
[
!
-e
"
${
JAR_BIN
}
"
]
;
then
echo
"
$JAVA_BIN
and/or
$JAR_BIN
not found on the system. Please make sure java and jar commands are available."
exit
1
fi
# Construct classpath using Atlas conf directory
# and jars from bridge/hive and hook/hive directories.
METADATACPPATH
=
"
$METADATA_CONF
"
for
i
in
"
${
BASEDIR
}
/bridge/hive/"
*
.jar
;
do
...
...
@@ -66,14 +70,8 @@ done
# log dir for applications
METADATA_LOG_DIR
=
"
${
METADATA_LOG_DIR
:-
$BASEDIR
/logs
}
"
export
METADATA_LOG_DIR
LOGFILE
=
"
$METADATA_LOG_DIR
/import-hive.log"
JAVA_PROPERTIES
=
"
$METADATA_OPTS
-Datlas.log.dir=
$METADATA_LOG_DIR
-Datlas.log.file=import-hive.log -Dlog4j.configuration=atlas-log4j.xml"
shift
while
[[
${
1
}
=
~ ^
\-
D
]]
;
do
JAVA_PROPERTIES
=
"
${
JAVA_PROPERTIES
}
${
1
}
"
shift
done
TIME
=
`
date
+%Y%m%d%H%M%s
`
#Add hive conf in classpath
...
...
@@ -88,10 +86,30 @@ else
exit
1
fi
export
HIVE_CP
echo
Using Hive configuration directory
[
$HIVE_CP
]
echo
"Logs for import are in
$METADATA_LOG_DIR
/import-hive.log"
${
JAVA_BIN
}
${
JAVA_PROPERTIES
}
-cp
${
HIVE_CP
}
:
${
METADATACPPATH
}
org.apache.atlas.hive.bridge.HiveMetaStoreBridge
CP
=
"
${
HIVE_CP
}
:
${
METADATACPPATH
}
"
# If running in cygwin, convert pathnames and classpath to Windows format.
if
[
"
${
CYGWIN
}
"
==
"true"
]
then
METADATA_LOG_DIR
=
`
cygpath
-w
${
METADATA_LOG_DIR
}
`
LOGFILE
=
`
cygpath
-w
${
LOGFILE
}
`
HIVE_CP
=
`
cygpath
-w
${
HIVE_CP
}
`
CP
=
`
cygpath
-w
-p
${
CP
}
`
fi
JAVA_PROPERTIES
=
"
$METADATA_OPTS
-Datlas.log.dir=
$METADATA_LOG_DIR
-Datlas.log.file=import-hive.log -Dlog4j.configuration=atlas-log4j.xml"
shift
while
[[
${
1
}
=
~ ^
\-
D
]]
;
do
JAVA_PROPERTIES
=
"
${
JAVA_PROPERTIES
}
${
1
}
"
shift
done
echo
Using Hive configuration directory
[
"
$HIVE_CP
"
]
echo
"Log file for import is
$LOGFILE
"
"
${
JAVA_BIN
}
"
${
JAVA_PROPERTIES
}
-cp
"
${
CP
}
"
org.apache.atlas.hive.bridge.HiveMetaStoreBridge
RETVAL
=
$?
[
$RETVAL
-eq
0
]
&&
echo
Hive Data Model imported successfully!!!
...
...
release-log.txt
View file @
27a39063
...
...
@@ -10,6 +10,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags)
ALL CHANGES:
ATLAS-257 import_hive.sh fails when run under cygwin(dkantor via sumasai)
ATLAS-255 Add log level setting for titan in atlas-log4j.xml(ayubkhan via sumasai)
ATLAS-246 QuickStart uses integer data type for dates, which causes data loss (dkantor via sumasai)
ATLAS-232 Fix the API incompatibility introduced in ATLAS-58(shwethags via sumasai)
...
...
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