Skip to content

Commit

Permalink
Merge pull request #57 from disney/develop
Browse files Browse the repository at this point in the history
Develop to master for 0.9.10
  • Loading branch information
guymolinari authored Apr 13, 2023
2 parents a36a64f + 999ac57 commit 5972fcd
Show file tree
Hide file tree
Showing 40 changed files with 958 additions and 642 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ bin/

# Automation
.espnautomation/
.DS_Store
quanta-loader/quanta-loader
4 changes: 3 additions & 1 deletion Docker/DeployKinesisConsumerDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ RUN chmod 755 /usr/bin/entrypoint.sh
# Port mapping of MySQL Proxy server. Default("127.0.0.1:4000")
EXPOSE 2112

ENTRYPOINT ["/usr/bin/entrypoint.sh"]
STOPSIGNAL SIGINT

CMD ["/usr/bin/entrypoint.sh"]
16 changes: 10 additions & 6 deletions Docker/kinesis_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh

BOOL_FLAGS=""
if [ -n "$INITIAL_POSITION" ]
then
Expand Down Expand Up @@ -39,13 +40,16 @@ then
BOOL_FLAGS=${BOOL_FLAGS}" --assume-role-arn-region=${ASSUME_ROLE_ARN_REGION}"
fi
fi
if [ -n "$SESSION_POOL_SIZE" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --session-pool-size=${SESSION_POOL_SIZE}"
fi
if [ -n "$PRESELECTOR" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --preselector="${PRESELECTOR}""
fi
exec /usr/bin/quanta-kinesis-consumer ${STREAM} ${INDEX} ${REGION} ${BOOL_FLAGS}

if [ -n "$SCAN_INTERVAL" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --scan-interval="${SCAN_INTERVAL}""
fi
if [ -n "$COMMIT_INTERVAL" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --commit-interval="${COMMIT_INTERVAL}""
fi
exec /usr/bin/quanta-kinesis-consumer ${STREAM} ${INDEX} ${SHARD_KEY} ${REGION} ${BOOL_FLAGS}
29 changes: 23 additions & 6 deletions Docker/loader_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
#!/bin/sh
BOOL_FLAGS=""
DATE_FILTER_FLAG=""

if [ -n "$DATE_FILTER" ]
if [ -n "$IGNORE_SOURCE_PATH" ]
then
DATE_FILTER_FLAG="--date-filter $DATE_FILTER"
BOOL_FLAGS=${BOOL_FLAGS}" --ignore-source-path"
fi

/usr/bin/quanta-loader ${BOOL_FLAGS} ${DATE_FILTER_FLAG} --buf-size ${BUF_SIZE} ${BUCKET_PATH} ${INDEX}
if [ -n "$NERD_CAPITALIZATION" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --nerd-capitalization"
fi
if [ -n "$ROLE_ARN" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --role-arn=${ROLE_ARN}"
fi
if [ -n "$AWS_REGION" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --aws-region=${AWS_REGION}"
fi
if [ -n "$KMS_KEY_ID" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --kms-key-id=${KMS_KEY_ID}"
fi
if [ -n "$ACL" ]
then
BOOL_FLAGS=${BOOL_FLAGS}" --acl=${ACL}"
fi
/usr/bin/quanta-loader ${BUCKET_PATH} ${INDEX} --buf-size ${BUF_SIZE} ${BOOL_FLAGS}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ vet:
lint:
go get golang.org/x/lint/golint
golint -set_exit_status ${GOLIST}
#gas ${PKG}

format:
go fmt ${PKG}
Expand Down Expand Up @@ -94,6 +93,7 @@ admin:

loader:
go build -o ${BIN_DIR}/${BIN_LOADER} ${LDFLAGS} ${PKG_LOADER}
docker build -t containerregistry.disney.com/digital/quanta-loader -f Docker/DeployLoaderDockerfile .

producer:
go build -o ${BIN_DIR}/${BIN_PRODUCER} ${LDFLAGS} ${PKG_PRODUCER}
Expand Down
15 changes: 15 additions & 0 deletions core/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (m BoolDirectMapper) MapValue(attr *Attribute, val interface{},
result = uint64(1)
}
default:
err = fmt.Errorf("%v: No handling for type '%T'", val, val)
return
}
if c != nil {
Expand Down Expand Up @@ -221,6 +222,8 @@ func (m FloatScaleBSIMapper) MapValue(attr *Attribute, val interface{},
switch val.(type) {
case float64:
floatVal = val.(float64)
case float32:
floatVal = float64(val.(float32))
case uint64:
floatVal = float64(val.(uint64))
case int64:
Expand Down Expand Up @@ -438,6 +441,10 @@ func (m SysMillisBSIMapper) MapValue(attr *Attribute, val interface{},
switch val.(type) {
case string:
strVal := val.(string)
if strVal == "" || strVal == "NULL" {
result = uint64(0)
return
}
loc, _ := time.LoadLocation("Local")
var t time.Time
t, err = dateparse.ParseIn(strVal, loc)
Expand Down Expand Up @@ -482,6 +489,10 @@ func (m SysMicroBSIMapper) MapValue(attr *Attribute, val interface{},
switch val.(type) {
case string:
strVal := val.(string)
if strVal == "" || strVal == "NULL" {
result = uint64(0)
return
}
loc, _ := time.LoadLocation("Local")
var t time.Time
t, err = dateparse.ParseIn(strVal, loc)
Expand Down Expand Up @@ -526,6 +537,10 @@ func (m SysSecBSIMapper) MapValue(attr *Attribute, val interface{},
switch val.(type) {
case string:
strVal := val.(string)
if strVal == "" || strVal == "NULL" {
result = uint64(0)
return
}
loc, _ := time.LoadLocation("Local")
var t time.Time
t, err = dateparse.ParseIn(strVal, loc)
Expand Down
1 change: 1 addition & 0 deletions core/projector.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func NewProjection(s *Session, foundSets map[string]*roaring64.Bitmap, joinNames

p.resultIterator = driverSet.ManyIterator()

//u.Warnf("PROJ FIELDS = %#v", p.projFieldMap)
return p, nil
}

Expand Down
Loading

0 comments on commit 5972fcd

Please sign in to comment.