Uploaded image for project: 'Kite SDK (READ-ONLY)'
  1. Kite SDK (READ-ONLY)
  2. KITE-455

Use generic Dataset type in DatasetRepository

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.14.1
    • Fix Version/s: 0.15.0
    • Component/s: Data Module, HBase Module
    • Labels:
      None

      Description

      While working on dataset URIs, CDK-385, I noticed that we can use generics to return concrete Dataset types instead of additional DatasetRepository types, like RandomAccessDatasetRepository. For example, rather than requiring two methods, load and loadRandomAccess, we can use one parameterized by the type that is expected:

      // using this method definition . . .
      public class Datsets {
        public <E, D extends Dataset<E>> D load(URI uri) { ... }
      }
      
      // this will work with RandomAccessDataset
      RandomAccessDataset<MyRecord> = Datasets.load("dataset:hbase:zk1/records");
      

      We should update the DatasetRepository interface so it can be used for HBase and get deprecate RandomAccessDatasetRepository.

      I suggest we do this for 0.15.0 so the new dataset URI code can be used with HBase without adding a loadRandomAccess method to be removed later.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                blue Ryan Blue
                Reporter:
                blue Ryan Blue
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: