Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gcp
gcp-bigdataml
Commits
19bd5d9b
Commit
19bd5d9b
authored
Mar 31, 2019
by
Federico Mestrone
Browse files
Fix for running Objectify without ServletFilter
parent
86d65995
Changes
1
Hide whitespace changes
Inline
Side-by-side
adtech-storage/src/main/java/gcp/cm/bigdata/adtech/IngesterDirect.java
View file @
19bd5d9b
...
...
@@ -2,7 +2,13 @@ package gcp.cm.bigdata.adtech;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.googlecode.objectify.Objectify
;
import
com.googlecode.objectify.ObjectifyService
;
import
gcp.cm.bigdata.adtech.domain.Impression
;
import
java.io.Closeable
;
import
java.io.IOException
;
import
static
com
.
googlecode
.
objectify
.
ObjectifyService
.
ofy
;
public
class
IngesterDirect
implements
Ingester
{
...
...
@@ -34,7 +40,12 @@ public class IngesterDirect implements Ingester {
BigtableHelper
.
insertNewImpression
(
entry
);
break
;
case
CLOUD_DATASTORE:
ofy
().
save
().
entity
(
entry
);
try
(
Closeable
c
=
ObjectifyService
.
begin
())
{
ofy
().
save
().
entity
(
entry
);
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"Data store error"
);
e
.
printStackTrace
();
}
break
;
}
}
...
...
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