-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from smartcitiesdata/minio-s3-patch
Mysterious minio means
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
FROM minio/minio:RELEASE.2019-01-16T21-44-08Z | ||
FROM minio/minio:RELEASE.2020-02-07T23-28-16Z | ||
|
||
RUN apk add inotify-tools | ||
|
||
COPY kdp /kdp | ||
|
||
CMD ["server", "/kdp"] | ||
ENTRYPOINT [] | ||
|
||
CMD ["/kdp/start-minio.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env sh | ||
# WHY?!?! | ||
## Hive cannot drop an empty folder as part of a drop table | ||
## S3 handles this in some mysterious way | ||
## Minio does not | ||
## This makes minio act in an equally mysterious way that works | ||
set -x | ||
|
||
mkdir -p /kdp/kdp-cloud-storage/hive-s3/ | ||
|
||
# Watches for new directories | ||
inotifywait -m /kdp/kdp-cloud-storage/hive-s3/ -e create \ | ||
| while read parent_directory action new_directory; do | ||
if [ "${action}" == "CREATE,ISDIR" ]; then | ||
# Makes a 0-byte file as a placeholder | ||
touch ${parent_directory}${new_directory}/.placeholder | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
/kdp/act-like-s3.sh & | ||
|
||
/usr/bin/minio server /kdp |