Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Export queue rewrite and refactored code to use 'uri' #90

Merged
merged 2 commits into from
Sep 23, 2016

Conversation

mikewalch
Copy link
Contributor

No description provided.

return IndexClient.genUriMutations((UriUpdate) export.getValue(), export.getSequence());
}

log.error("Unknown IndexUpdate object placed on index export queue");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably throw an exception and include the class name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5d58150

public static Collection<Mutation> genDomainMutations(DomainUpdate update, long seq) {
Map<RowColumn, Bytes> oldData = genDomainData(update.getDomain(), update.getOldPageCount());
Map<RowColumn, Bytes> newData = genDomainData(update.getDomain(), update.getNewPageCount());
return AccumuloExportQueue.generateMutations(seq, oldData, newData);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not realize this while looking at the recipes PR, but looking at this PR made me realize that generateMutations is a really generic name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Do you want to create an issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/**
* Used by URI collision free map
*/
public class UriInfo implements Serializable {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this just copied out of UriMap? just wondering if there are any changes to review

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it was just copied out

@@ -38,12 +39,12 @@ public Kryo create() {
// same order it would be ok) and ran into issue where Spark and Fluo code were using different
// ids for some reason.
kryo.register(UriInfo.class, 9);
kryo.register(DomainExport.class, 10);
kryo.register(UriCountExport.class, 11);
kryo.register(PageExport.class, 12);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update docs/code-guide.md for these changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated code guide in f0cbafb

import webindex.core.models.Link;
import webindex.core.models.Page;
import webindex.core.models.UriInfo;
import webindex.core.models.update.IndexUpdate;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is everything in models.update pkg related to exporting? If so I would prefer calling it models.export... but thats just my personal preference. Update also make sense, I am just thinking export is more specific.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to group them but I am not stuck on 'update'. I can make the package 'export'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change package name to 'export' in f0cbafb

@keith-turner
Copy link
Member

+1

* Updates due to changes in apache/fluo-recipes#102
* All objects placed on export queue now implement IndexUpdate
  interface and only represent data that is being exported
* Moved code that creates Accumulo mutations from export objects
  to IndexClient
@mikewalch mikewalch merged commit d95f6f4 into astralway:apache-prep Sep 23, 2016
@mikewalch mikewalch deleted the export-rewrite branch September 23, 2016 16:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants