Fixing a typo in "How to Contribute".
CDK-129 Upgrade cdk-morphlines-saxon module from saxon-HE-9.5.1-1 to saxon-HE-9.5.1-2
performance enhancement
add comments
add comments
fix typo in URL
performance enhancement
performance enhancement
performance enhancement
performance enhancement
Merge branch 'master' of https://github.com/cloudera/cdk
Adding @since annotation to DatasetReader#next.
CDK-128: Repository get => load, drop => delete.

Renaming DatasetRepository methods for the API update. This introduces
AbstractDatasetRepository in the SPI for compatibility, which the two
repository implementations now inherit from.
CDK-128: Migrating FS repository test to new API.
CDK-128: Updating HCatalog to consume the new API.
CDK-128: Updating HCatalog tests for new repo API.
CDK-128: MetadataProvider save => create, update.

Splitting the MetadataProvider#save method into create and update for the API
changes. This introduces an AbstractMetadataProvider in the SPI for
compatibility, which the two implementations now inherit from. To correctly
send method calls from the old save method to either create or update, the
abstract base class needed to determine whether a descriptor already exists.
Currently, the only way to do this is by calling load. This is how the save
method is currently implemented, but it exposes the need in the API for an
exists call. If users need to know if a data set or descriptor exists, and the
API throws an Exception if they are wrong, then there needs to be a way to get
that information. This should be added with list().

The HCatalog implementation has also been updated to (correctly) throw a
MetadataProviderException when the HCatalog library can't open a table, rather
than a RuntimeException. Without this, the save implementation in
AbstractMetadataProvider doesn't work.
CDK-128: Updating HCatalog tests for the new API.
CDK-128: Adding NoSuchDatasetException.

Callers should be able to handle a missing dataset. NoSuchDatasetException will
be thrown when an operation is requested on a data set or descriptor that is
missing---except for delete, which returns false. This also fixes a problem in
the AbstractMetadataProvider's save implementation, where it had to assume that
any MetadataProviderException meant that the descriptor was missing. Now, it
catches just the NoSuchDatasetException and correctly calls either create or
update.
CDK-128: Updating FS data sets for API changes.

This breaks the FileSystemMetadataProvider#save method into create and update,
but keeps most of the common functionality in a private writeDescriptor method.
Now, create checks to see that it is not overwriting and existing data set and
update assumes the descriptor exists and tries to overwrite it.

This commit also cleans up Path handling between the FS DatasetRepository and
the FS MetadataProvider. The repository is responsible for deciding where data
will be stored, so the metadata provider should delegate to it. To avoid a
circular reference, both now depend on a protected static method to determine
how data paths are created (while not great, this is better than both
constructing paths separately). They both also have pathForDataset
implementations that check the repository root is not null (via checkState).
This addresses the "what happens on windows?" comment in MetadataProvider by
replacing / with Path.SEPARATOR_CHAR, although it is unclear why this happens
at all.

Another fix in this commit is to handling delete. Before, delete would delete
the data folder only if the metadata was deleted, but not it if it was missing
(already deleted). Now, the return of MetadataProvider#delete is ignored: the
DatasetRepository does not require that the metadata is deleted at the same
time, just that it is gone and did not throw an Exception.