Skip to content

Unified Row Handling - geowave-985#1040

Merged
rfecher merged 1 commit intocasanamo-masterfrom
geowave-985-rebase
Feb 20, 2017
Merged

Unified Row Handling - geowave-985#1040
rfecher merged 1 commit intocasanamo-masterfrom
geowave-985-rebase

Conversation

@rfecher
Copy link
Copy Markdown
Contributor

@rfecher rfecher commented Feb 17, 2017

No description provided.

@rfecher rfecher mentioned this pull request Feb 17, 2017
Copy link
Copy Markdown
Contributor Author

@rfecher rfecher left a comment

Choose a reason for hiding this comment

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

A few things to look into before we merge...

/**
* Public access to AdapterStore
*/
public AdapterStore getAdapterStore();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Methods internal to GeoWave I'd prefer to be outside of the DataStore interface...

DataStore is the main user facing API and should be as clean as possible, these methods are for relatively low-level mechanics used internally for reusability and would be better suited as abstract methods in BaseDataStore than exposed through the interface

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll have to look at it. I must've added that because I needed access to the adapter store via the interface.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I will remove that, and change the method args to use BaseDataStore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unused method. deleted.

@SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "private class only accessed internally")
public class GeowaveRowId implements
NativeGeoWaveRow
public class GeowaveRowId
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could this be replaced by GeoWaveRowImpl?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

well, actually I do see that GeoWaveRowImpl has the value and this doesn't...would it make sense for GeoWaveRowImpl to contain GeoWaveRowId to consolidate any of the row ID logic, and then GeoWaveRowImpl is then basically a container for GeoWaveRowId + value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, GeoWaveRowImpl already manages the row ID. I did tackle many of the places where that (or AccumuloID, or whatever) were being used, but apparently not all of them. I need to go back and finish this up.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done

return statsStore;
}

@Override
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

unnecessary if we move decodeRow to BaseDataStore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done

List<Integer> fieldPositions = BitmaskUtils.getFieldPositions(row.getFieldMask());

// Collect the valid fields
int fieldIndex = 0;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hmm, the temporary hack still lives...I can take a look at it, I had thought it should go away if we have the field mask for all datastore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

decodeRow in DataStoreUtils isn't used anymore - forgot to delete it. However, the same logic is now in BaseDataStore's decodeRow, but it's not 'the hack' anymore, in that Cass & Dyn now have field masks. This code is just walking through the list of fields identified by the field mask to decide what to fields to include.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need to go back to HBase decodeRow as the template. This should allow us to unify properly and eliminate most of the duplication in the utils classes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BaseDataStore's decodeRow is now sync'd up w/ HBase logic; however, we won't be able to completely integrate until we solve visibility handling.

private final static Logger LOGGER = Logger.getLogger(CassandraDataStore.class);
public static final Integer PARTITIONS = 4;

static {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

is this just meant as a temporary thing in your dev environment?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yep, sorry. I need to mark those up better when I do that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

done

@rfecher rfecher merged commit d0c7a59 into casanamo-master Feb 20, 2017
@rfecher rfecher deleted the geowave-985-rebase branch February 20, 2017 15:54
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

Successfully merging this pull request may close these issues.

2 participants