Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong id used in ExampleJobPrep.java? #30

Open
mattjamison opened this issue Mar 30, 2017 · 0 comments
Open

Wrong id used in ExampleJobPrep.java? #30

mattjamison opened this issue Mar 30, 2017 · 0 comments

Comments

@mattjamison
Copy link

I may just be missing something, but it seems like the wrong id is being passed in the ExampleJobPrep job, which results in elastic search indexing documents with the generated "customer ids" rather than the actual unique document ids? The result for me anyway is that only a few documents are created and then updated many times when running the example flow.

index 8a256c0..8e750ef 100644
--- a/src/main/java/com/inin/analytics/elasticsearch/example/ExampleJobPrep.java
+++ b/src/main/java/com/inin/analytics/elasticsearch/example/ExampleJobPrep.java
@@ -56,7 +56,7 @@ public class ExampleJobPrep  implements Tool {
                        String routingHash = elasticsearchRoutingStrategy.getRoutingHash(customerId, docId);

                        Text outputKey = new Text(INDEX_TYPE + BaseESReducer.TUPLE_SEPARATOR + routingHash);
-                       Text outputValue = new Text(INDEX_TYPE + BaseESReducer.TUPLE_SEPARATOR + customerId + BaseESReducer.TUPLE_SEPARATOR + json);
+                       Text outputValue = new Text(INDEX_TYPE + BaseESReducer.TUPLE_SEPARATOR + docId + BaseESReducer.TUPLE_SEPARATOR + json);
                        context.write(outputKey, outputValue);
                }
        }```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant