├── .github └── workflows │ ├── nebula-ci.yml │ ├── nebula-publish.yml │ └── nebula-snapshot.yml ├── .gitignore ├── .makefile.identity.inc ├── .makefile.inc ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── NOTICE ├── OSSMETADATA ├── README.md ├── build.gradle ├── config └── checkstyle │ ├── checkstyle.xml │ └── suppression.xml ├── dependencies.lock ├── deploy_docs.sh ├── docs ├── CNAME ├── OSSMETADATA ├── acknowledgements.md ├── advanced-topics.md ├── assets │ └── images │ │ └── favicon.png ├── community.md ├── css │ └── extra.css ├── data-ingestion.md ├── data-modeling.md ├── diving-deeper.md ├── getting-started.md ├── glossary.md ├── img │ ├── aws-attach-existing-policies.png │ ├── aws-attach-policy.png │ ├── aws-create-s3-bucket.png │ ├── aws-create-user.png │ ├── aws-dynamodb-create-table.png │ ├── aws-dynamodb-scan-table.png │ ├── aws-s3-full-access.png │ ├── aws-select-dynamodb.png │ ├── aws-select-iam.png │ ├── aws-select-s3.png │ ├── aws-user-review.png │ ├── corner-logo.png │ ├── explorer-augmentsearchresult.png │ ├── explorer-browseschema.png │ ├── explorer-browsesearchresult.png │ ├── explorer-browsetype.png │ ├── explorer-home.png │ ├── explorer-searchquery.png │ ├── explorer-searchresult.png │ ├── history-home.png │ ├── history-lookup.png │ ├── history-objectview.png │ ├── history-objectview2.png │ ├── history-state.png │ ├── history-statetype.png │ ├── logo.png │ ├── logo_white_bg.png │ ├── memlayout-bitstring.png │ ├── memlayout-list.png │ ├── memlayout-map.png │ ├── memlayout-object.png │ └── memlayout-set.png ├── index.md ├── indexing-querying.md ├── infrastructure.md ├── interacting-with-a-dataset.md ├── license.md ├── producer-consumer-apis.md ├── quick-start.md ├── testing.md ├── tooling.md └── validation.md ├── gradle ├── buildViaTravis.sh └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── hollow-diff-ui ├── build.gradle ├── dependencies.lock └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── netflix │ │ │ └── hollow │ │ │ ├── diff │ │ │ └── ui │ │ │ │ ├── DiffUIServer.java │ │ │ │ ├── DiffUIWebServer.java │ │ │ │ ├── HollowDiffUI.java │ │ │ │ ├── HollowDiffUIRouter.java │ │ │ │ ├── HollowDiffUIServer.java │ │ │ │ ├── jetty │ │ │ │ └── HollowDiffUIServer.java │ │ │ │ ├── model │ │ │ │ ├── HollowDiffOverviewTypeEntry.java │ │ │ │ ├── HollowDiffUIBreadcrumbs.java │ │ │ │ ├── HollowFieldDiffScore.java │ │ │ │ ├── HollowHeaderEntry.java │ │ │ │ ├── HollowObjectPairDiffScore.java │ │ │ │ └── HollowUnmatchedObject.java │ │ │ │ └── pages │ │ │ │ ├── DiffFieldPage.java │ │ │ │ ├── DiffObjectPage.java │ │ │ │ ├── DiffOverviewPage.java │ │ │ │ ├── DiffPage.java │ │ │ │ └── DiffTypePage.java │ │ │ ├── diffview │ │ │ ├── DiffViewOutputGenerator.java │ │ │ ├── HollowDiffHtmlKickstarter.java │ │ │ ├── HollowDiffView.java │ │ │ ├── HollowDiffViewProvider.java │ │ │ ├── HollowDiffViewRow.java │ │ │ ├── HollowHistoryView.java │ │ │ ├── HollowHistoryViewProvider.java │ │ │ ├── HollowObjectDiffViewGenerator.java │ │ │ ├── HollowObjectView.java │ │ │ ├── HollowObjectViewProvider.java │ │ │ └── effigy │ │ │ │ ├── CustomHollowEffigyFactory.java │ │ │ │ ├── HollowEffigy.java │ │ │ │ ├── HollowEffigyFactory.java │ │ │ │ ├── HollowRecordDiffUI.java │ │ │ │ └── pairer │ │ │ │ ├── HollowEffigyCollectionPairer.java │ │ │ │ ├── HollowEffigyDiffRecord.java │ │ │ │ ├── HollowEffigyFieldPairer.java │ │ │ │ ├── HollowEffigyMapPairer.java │ │ │ │ ├── HollowEffigyNullPartnerPairer.java │ │ │ │ ├── HollowEffigyObjectPairer.java │ │ │ │ └── exact │ │ │ │ ├── DiffExactRecordMatcher.java │ │ │ │ ├── ExactRecordMatcher.java │ │ │ │ └── HistoryExactRecordMatcher.java │ │ │ └── history │ │ │ └── ui │ │ │ ├── HollowHistoryRefreshListener.java │ │ │ ├── HollowHistoryUI.java │ │ │ ├── HollowHistoryUIServer.java │ │ │ ├── VersionTimestampConverter.java │ │ │ ├── jetty │ │ │ └── HollowHistoryUIServer.java │ │ │ ├── model │ │ │ ├── HistoricalObjectChangeVersion.java │ │ │ ├── HistoryOverviewRow.java │ │ │ ├── HistoryStateQueryMatches.java │ │ │ ├── HistoryStateTypeChangeSummary.java │ │ │ ├── HistoryStateTypeChanges.java │ │ │ ├── RecordDiff.java │ │ │ └── RecordDiffTreeNode.java │ │ │ ├── naming │ │ │ └── HollowHistoryRecordNamer.java │ │ │ └── pages │ │ │ ├── HistoricalObjectDiffPage.java │ │ │ ├── HistoryOverviewPage.java │ │ │ ├── HistoryPage.java │ │ │ ├── HistoryQueryPage.java │ │ │ ├── HistoryStatePage.java │ │ │ ├── HistoryStateTypeExpandGroupPage.java │ │ │ └── HistoryStateTypePage.java │ └── resources │ │ ├── collapse.png │ │ ├── diff-field.vm │ │ ├── diff-footer.vm │ │ ├── diff-header.vm │ │ ├── diff-object.vm │ │ ├── diff-overview.vm │ │ ├── diff-type.vm │ │ ├── diffview.css │ │ ├── expand.png │ │ ├── expandall.png │ │ ├── history-footer.vm │ │ ├── history-header.vm │ │ ├── history-object.vm │ │ ├── history-overview.vm │ │ ├── history-query.vm │ │ ├── history-state-enhanced-ui.vm │ │ ├── history-state-type-expand-group.vm │ │ ├── history-state-type.vm │ │ ├── history-state.css │ │ ├── history-state.vm │ │ ├── history.js │ │ └── partial_expand.png │ ├── test │ └── java │ │ └── com │ │ └── netflix │ │ └── hollow │ │ └── diffview │ │ ├── FakeHollowDiffGenerator.java │ │ ├── FakeHollowHistoryUtil.java │ │ ├── HollowDiffUIServerTest.java │ │ ├── HollowEffigyCollectionPairerTest.java │ │ ├── HollowEffigyDiffRecordTest.java │ │ ├── HollowEffigyFieldPairerTest.java │ │ ├── HollowHistoryUIServerTest.java │ │ └── HollowHistoryUITest.java │ └── tools │ └── java │ └── com │ └── netflix │ └── hollow │ └── diff │ └── ui │ ├── DiffUITest.java │ └── HistoryUITest.java ├── hollow-explorer-ui ├── build.gradle ├── dependencies.lock └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── netflix │ │ │ └── hollow │ │ │ └── explorer │ │ │ └── ui │ │ │ ├── HollowExplorerUI.java │ │ │ ├── HollowExplorerUIServer.java │ │ │ ├── jetty │ │ │ └── HollowExplorerUIServer.java │ │ │ ├── model │ │ │ ├── QueryResult.java │ │ │ ├── SchemaDisplay.java │ │ │ ├── SchemaDisplayField.java │ │ │ ├── TypeKey.java │ │ │ └── TypeOverview.java │ │ │ └── pages │ │ │ ├── BrowseSchemaPage.java │ │ │ ├── BrowseSelectedTypePage.java │ │ │ ├── HollowExplorerPage.java │ │ │ ├── QueryPage.java │ │ │ └── ShowAllTypesPage.java │ └── resources │ │ ├── browse-schema.vm │ │ ├── browse-selected-type-bottom.vm │ │ ├── browse-selected-type-top.vm │ │ ├── explorer-footer.vm │ │ ├── explorer-header.vm │ │ ├── query.vm │ │ └── show-all-types.vm │ └── test │ └── java │ └── com │ └── netflix │ └── hollow │ └── explorer │ └── ui │ └── HollowExplorerUIServerTest.java ├── hollow-fakedata ├── README.md ├── build.gradle └── src │ └── main │ └── java │ └── hollow │ ├── FakeDataGenerator.java │ └── model │ ├── Art.java │ ├── Artist.java │ ├── Book.java │ ├── BookId.java │ ├── BookImages.java │ ├── BookMetadata.java │ ├── Chapter.java │ ├── ChapterId.java │ ├── ChapterInfo.java │ ├── Country.java │ ├── Genre.java │ └── Scene.java ├── hollow-jsonadapter ├── build.gradle ├── dependencies.lock └── src │ ├── main │ └── java │ │ └── com │ │ └── netflix │ │ └── hollow │ │ └── jsonadapter │ │ ├── AbstractHollowJsonAdaptorTask.java │ │ ├── HollowJsonAdapter.java │ │ ├── HollowJsonAdapterPrimaryKeyFinder.java │ │ ├── HollowJsonToFlatRecordTask.java │ │ ├── ObjectFieldMapping.java │ │ ├── ObjectMappedFieldPath.java │ │ ├── chunker │ │ ├── JsonArrayChunkReader.java │ │ ├── JsonArrayChunker.java │ │ └── JsonArrayChunkerInputSegment.java │ │ ├── discover │ │ ├── DiscoveredSchemaType.java │ │ ├── HollowDiscoveredField.java │ │ ├── HollowDiscoveredSchema.java │ │ ├── HollowJsonAdapterSchemaDiscoverer.java │ │ ├── HollowSchemaNamer.java │ │ └── SchemaSolidifier.java │ │ ├── field │ │ ├── FieldProcessor.java │ │ └── impl │ │ │ └── AbstractFieldProcessor.java │ │ └── util │ │ └── JsonUtil.java │ └── test │ └── java │ └── com │ └── netflix │ └── hollow │ └── jsonadapter │ └── chunker │ └── JsonArrayChunkerTest.java ├── hollow-perf ├── README.md ├── build.gradle ├── dependencies.lock └── src │ ├── jmh │ └── java │ │ └── com │ │ └── netflix │ │ └── hollow │ │ └── core │ │ ├── index │ │ ├── AbstractHollowIndexBenchmark.java │ │ ├── HollowHashIndexBenchmark.java │ │ └── key │ │ │ └── HollowPrimaryKeyIndexBenchmark.java │ │ ├── memory │ │ └── encoding │ │ │ ├── CheckSumCollections.java │ │ │ ├── HashCodesBenchmark.java │ │ │ ├── OrdinalMapResize.java │ │ │ └── ReadWriteFixedLengthElementArrayTest.java │ │ └── read │ │ ├── ReadWriteStateEngineTest.java │ │ └── engine │ │ └── object │ │ ├── HollowObjectTypeReadStateDeltaTransitionBenchmark.java │ │ └── HollowObjectTypeReadStateShardBenchmark.java │ └── main │ └── java │ └── hollow │ ├── FixedLengthElementArrayPlainPut.java │ └── SegmentedLongArrayPlainPut.java ├── hollow-test ├── build.gradle ├── dependencies.lock └── src │ ├── main │ └── java │ │ └── com │ │ └── netflix │ │ └── hollow │ │ └── test │ │ ├── HollowReadStateEngineBuilder.java │ │ ├── HollowWriteStateEngineBuilder.java │ │ ├── InMemoryBlobStore.java │ │ ├── consumer │ │ ├── TestAnnouncementWatcher.java │ │ ├── TestBlob.java │ │ ├── TestBlobRetriever.java │ │ └── TestHollowConsumer.java │ │ └── model │ │ └── TestTypeA.java │ └── test │ └── java │ └── com │ └── netflix │ └── hollow │ └── test │ ├── HollowReadStateEngineBuilderTest.java │ └── consumer │ └── TestHollowConsumerTest.java ├── hollow-ui-tools ├── build.gradle ├── dependencies.lock └── src │ ├── main │ └── java │ │ └── com │ │ └── netflix │ │ └── hollow │ │ └── ui │ │ ├── EscapingTool.java │ │ ├── HollowDiffUtil.java │ │ ├── HollowUIRouter.java │ │ ├── HollowUISession.java │ │ ├── HollowUIWebServer.java │ │ ├── HtmlEscapingWriter.java │ │ ├── HttpHandlerWithServletSupport.java │ │ └── UIServer.java │ └── test │ └── java │ └── com │ └── netflix │ └── hollow │ └── ui │ └── HollowDiffUtilTest.java ├── hollow-zenoadapter ├── build.gradle ├── dependencies.lock └── src │ ├── main │ └── java │ │ └── com │ │ └── netflix │ │ └── hollow │ │ └── zenoadapter │ │ ├── HollowFrameworkSerializer.java │ │ ├── HollowOrdinalMappingLoader.java │ │ ├── HollowSerializationFramework.java │ │ ├── HollowSerializationRecord.java │ │ └── util │ │ ├── HollowStateEngineCreator.java │ │ └── ObjectIdentityOrdinalMap.java │ └── test │ └── java │ └── com │ └── netflix │ └── hollow │ └── zenoadapter │ └── util │ └── ObjectIdentityOrdinalMapTest.java ├── hollow ├── build.gradle ├── dependencies.lock └── src │ ├── main │ └── java │ │ └── com │ │ └── netflix │ │ └── hollow │ │ ├── Hollow.java │ │ ├── HollowGenerated.java │ │ ├── Internal.java │ │ ├── PublicApi.java │ │ ├── PublicSpi.java │ │ ├── api │ │ ├── client │ │ │ ├── FailedTransitionTracker.java │ │ │ ├── HollowAPIFactory.java │ │ │ ├── HollowAnnouncementWatcher.java │ │ │ ├── HollowBlob.java │ │ │ ├── HollowBlobRetriever.java │ │ │ ├── HollowClient.java │ │ │ ├── HollowClientConsumerBridge.java │ │ │ ├── HollowClientMemoryConfig.java │ │ │ ├── HollowClientUpdater.java │ │ │ ├── HollowDataHolder.java │ │ │ ├── HollowUpdateListener.java │ │ │ ├── HollowUpdatePlan.java │ │ │ ├── HollowUpdatePlanner.java │ │ │ ├── StackTraceRecorder.java │ │ │ └── StaleHollowReferenceDetector.java │ │ ├── codegen │ │ │ ├── AbstractHollowAPIGeneratorBuilder.java │ │ │ ├── ArgumentParser.java │ │ │ ├── CodeGeneratorConfig.java │ │ │ ├── HollowAPIClassJavaGenerator.java │ │ │ ├── HollowAPIFactoryJavaGenerator.java │ │ │ ├── HollowAPIGenerator.java │ │ │ ├── HollowCodeGenerationUtils.java │ │ │ ├── HollowConsumerJavaFileGenerator.java │ │ │ ├── HollowErgonomicAPIShortcuts.java │ │ │ ├── HollowJavaFileGenerator.java │ │ │ ├── HollowPOJOClassGenerator.java │ │ │ ├── HollowPOJOGenerator.java │ │ │ ├── api │ │ │ │ ├── HollowDataAccessorGenerator.java │ │ │ │ ├── HollowTypeAPIGenerator.java │ │ │ │ ├── TypeAPIListJavaGenerator.java │ │ │ │ ├── TypeAPIMapJavaGenerator.java │ │ │ │ ├── TypeAPIObjectJavaGenerator.java │ │ │ │ └── TypeAPISetJavaGenerator.java │ │ │ ├── delegate │ │ │ │ ├── HollowObjectDelegateCachedImplGenerator.java │ │ │ │ ├── HollowObjectDelegateGenerator.java │ │ │ │ ├── HollowObjectDelegateInterfaceGenerator.java │ │ │ │ └── HollowObjectDelegateLookupImplGenerator.java │ │ │ ├── indexes │ │ │ │ ├── HollowHashIndexGenerator.java │ │ │ │ ├── HollowIndexGenerator.java │ │ │ │ ├── HollowPrimaryKeyIndexGenerator.java │ │ │ │ ├── HollowUniqueKeyIndexGenerator.java │ │ │ │ └── LegacyHollowPrimaryKeyIndexGenerator.java │ │ │ ├── objects │ │ │ │ ├── HollowCollectionsGenerator.java │ │ │ │ ├── HollowFactoryJavaGenerator.java │ │ │ │ ├── HollowListJavaGenerator.java │ │ │ │ ├── HollowMapJavaGenerator.java │ │ │ │ ├── HollowObjectJavaGenerator.java │ │ │ │ └── HollowSetJavaGenerator.java │ │ │ ├── perfapi │ │ │ │ ├── HollowObjectTypePerfAPIClassGenerator.java │ │ │ │ ├── HollowPerformanceAPIClassGenerator.java │ │ │ │ └── HollowPerformanceAPIGenerator.java │ │ │ └── testdata │ │ │ │ ├── HollowListTypeTestDataAPIClassGenerator.java │ │ │ │ ├── HollowMapTypeTestDataAPIClassGenerator.java │ │ │ │ ├── HollowObjectTypeTestDataAPIClassGenerator.java │ │ │ │ ├── HollowSetTypeTestDataAPIClassGenerator.java │ │ │ │ ├── HollowTestDataAPIClassGenerator.java │ │ │ │ └── HollowTestDataAPIGenerator.java │ │ ├── common │ │ │ ├── EventListener.java │ │ │ ├── ListenerSupport.java │ │ │ └── Listeners.java │ │ ├── consumer │ │ │ ├── HollowConsumer.java │ │ │ ├── HollowConsumerAPI.java │ │ │ ├── data │ │ │ │ ├── AbstractHollowDataAccessor.java │ │ │ │ ├── AbstractHollowOrdinalIterable.java │ │ │ │ └── GenericHollowRecordDataAccessor.java │ │ │ ├── fs │ │ │ │ ├── HollowFilesystemAnnouncementWatcher.java │ │ │ │ └── HollowFilesystemBlobRetriever.java │ │ │ ├── index │ │ │ │ ├── AbstractHollowHashIndex.java │ │ │ │ ├── AbstractHollowUniqueKeyIndex.java │ │ │ │ ├── FieldPath.java │ │ │ │ ├── HashIndex.java │ │ │ │ ├── HashIndexSelect.java │ │ │ │ ├── HollowUniqueKeyIndex.java │ │ │ │ ├── MatchFieldPathArgumentExtractor.java │ │ │ │ ├── SelectFieldPathResultExtractor.java │ │ │ │ └── UniqueKeyIndex.java │ │ │ └── metrics │ │ │ │ ├── AbstractRefreshMetricsListener.java │ │ │ │ ├── ConsumerRefreshMetrics.java │ │ │ │ ├── RefreshMetricsReporting.java │ │ │ │ └── UpdatePlanDetails.java │ │ ├── custom │ │ │ ├── HollowAPI.java │ │ │ ├── HollowListTypeAPI.java │ │ │ ├── HollowMapTypeAPI.java │ │ │ ├── HollowObjectTypeAPI.java │ │ │ ├── HollowSetTypeAPI.java │ │ │ └── HollowTypeAPI.java │ │ ├── error │ │ │ ├── HollowException.java │ │ │ ├── HollowWriteStateException.java │ │ │ ├── IncompatibleSchemaException.java │ │ │ └── SchemaNotFoundException.java │ │ ├── metrics │ │ │ ├── HollowConsumerMetrics.java │ │ │ ├── HollowMetrics.java │ │ │ ├── HollowMetricsCollector.java │ │ │ └── HollowProducerMetrics.java │ │ ├── objects │ │ │ ├── HollowList.java │ │ │ ├── HollowMap.java │ │ │ ├── HollowObject.java │ │ │ ├── HollowRecord.java │ │ │ ├── HollowSet.java │ │ │ ├── delegate │ │ │ │ ├── HollowCachedDelegate.java │ │ │ │ ├── HollowListCachedDelegate.java │ │ │ │ ├── HollowListDelegate.java │ │ │ │ ├── HollowListLookupDelegate.java │ │ │ │ ├── HollowMapCachedDelegate.java │ │ │ │ ├── HollowMapDelegate.java │ │ │ │ ├── HollowMapLookupDelegate.java │ │ │ │ ├── HollowObjectAbstractDelegate.java │ │ │ │ ├── HollowObjectDelegate.java │ │ │ │ ├── HollowObjectGenericDelegate.java │ │ │ │ ├── HollowRecordDelegate.java │ │ │ │ ├── HollowSetCachedDelegate.java │ │ │ │ ├── HollowSetDelegate.java │ │ │ │ └── HollowSetLookupDelegate.java │ │ │ ├── generic │ │ │ │ ├── GenericHollowIterable.java │ │ │ │ ├── GenericHollowList.java │ │ │ │ ├── GenericHollowMap.java │ │ │ │ ├── GenericHollowObject.java │ │ │ │ ├── GenericHollowRecordHelper.java │ │ │ │ └── GenericHollowSet.java │ │ │ └── provider │ │ │ │ ├── HollowFactory.java │ │ │ │ ├── HollowObjectCacheProvider.java │ │ │ │ ├── HollowObjectFactoryProvider.java │ │ │ │ └── HollowObjectProvider.java │ │ ├── perfapi │ │ │ ├── HashKeyExtractor.java │ │ │ ├── HollowListTypePerfAPI.java │ │ │ ├── HollowMapTypePerfAPI.java │ │ │ ├── HollowObjectTypePerfAPI.java │ │ │ ├── HollowPerfAPICache.java │ │ │ ├── HollowPerfBackedList.java │ │ │ ├── HollowPerfBackedMap.java │ │ │ ├── HollowPerfBackedSet.java │ │ │ ├── HollowPerfMapEntryIterator.java │ │ │ ├── HollowPerfReferenceIterator.java │ │ │ ├── HollowPerformanceAPI.java │ │ │ ├── HollowRef.java │ │ │ ├── HollowSetTypePerfAPI.java │ │ │ ├── HollowTypePerfAPI.java │ │ │ ├── POJOInstantiator.java │ │ │ └── Ref.java │ │ ├── producer │ │ │ ├── AbstractHollowProducer.java │ │ │ ├── AbstractHollowProducerListener.java │ │ │ ├── AbstractIncrementalCycleListener.java │ │ │ ├── CloseableIncrementalWriteState.java │ │ │ ├── CloseableWriteState.java │ │ │ ├── HollowIncrementalCyclePopulator.java │ │ │ ├── HollowIncrementalProducer.java │ │ │ ├── HollowProducer.java │ │ │ ├── HollowProducerListener.java │ │ │ ├── IncrementalCycleListener.java │ │ │ ├── ProducerListenerSupport.java │ │ │ ├── ProducerOptionalBlobPartConfig.java │ │ │ ├── ReadStateHelper.java │ │ │ ├── Status.java │ │ │ ├── VersionMinterWithCounter.java │ │ │ ├── enforcer │ │ │ │ ├── AbstractSingleProducerEnforcer.java │ │ │ │ ├── BasicSingleProducerEnforcer.java │ │ │ │ └── SingleProducerEnforcer.java │ │ │ ├── fs │ │ │ │ ├── HollowFilesystemAnnouncer.java │ │ │ │ ├── HollowFilesystemBlobStager.java │ │ │ │ ├── HollowFilesystemBlobStorageCleaner.java │ │ │ │ ├── HollowFilesystemPublisher.java │ │ │ │ └── HollowInMemoryBlobStager.java │ │ │ ├── listener │ │ │ │ ├── AnnouncementListener.java │ │ │ │ ├── CycleListener.java │ │ │ │ ├── DataModelInitializationListener.java │ │ │ │ ├── HollowProducerEventListener.java │ │ │ │ ├── IncrementalPopulateListener.java │ │ │ │ ├── IntegrityCheckListener.java │ │ │ │ ├── PopulateListener.java │ │ │ │ ├── PublishListener.java │ │ │ │ ├── RestoreListener.java │ │ │ │ └── VetoableListener.java │ │ │ ├── metrics │ │ │ │ ├── AbstractProducerMetricsListener.java │ │ │ │ ├── AnnouncementMetrics.java │ │ │ │ ├── CycleMetrics.java │ │ │ │ └── ProducerMetricsReporting.java │ │ │ └── validation │ │ │ │ ├── DuplicateDataDetectionValidator.java │ │ │ │ ├── ObjectModificationValidator.java │ │ │ │ ├── RecordCountPercentChangeValidator.java │ │ │ │ ├── RecordCountVarianceValidator.java │ │ │ │ ├── ValidationResult.java │ │ │ │ ├── ValidationResultType.java │ │ │ │ ├── ValidationStatus.java │ │ │ │ ├── ValidationStatusException.java │ │ │ │ ├── ValidationStatusListener.java │ │ │ │ └── ValidatorListener.java │ │ ├── sampling │ │ │ ├── DisabledSamplingDirector.java │ │ │ ├── EnabledSamplingDirector.java │ │ │ ├── HollowListSampler.java │ │ │ ├── HollowMapSampler.java │ │ │ ├── HollowObjectCreationSampler.java │ │ │ ├── HollowObjectSampler.java │ │ │ ├── HollowSampler.java │ │ │ ├── HollowSamplingDirector.java │ │ │ ├── HollowSetSampler.java │ │ │ ├── SampleResult.java │ │ │ ├── SamplingStatusListener.java │ │ │ └── TimeSliceSamplingDirector.java │ │ └── testdata │ │ │ ├── HollowTestBlobRetriever.java │ │ │ ├── HollowTestDataMapEntry.java │ │ │ ├── HollowTestDataset.java │ │ │ ├── HollowTestListRecord.java │ │ │ ├── HollowTestMapRecord.java │ │ │ ├── HollowTestObjectRecord.java │ │ │ ├── HollowTestRecord.java │ │ │ └── HollowTestSetRecord.java │ │ ├── core │ │ ├── HollowBlobHeader.java │ │ ├── HollowBlobOptionalPartHeader.java │ │ ├── HollowConstants.java │ │ ├── HollowDataset.java │ │ ├── HollowStateEngine.java │ │ ├── index │ │ │ ├── FieldPath.java │ │ │ ├── FieldPaths.java │ │ │ ├── GrowingSegmentedLongArray.java │ │ │ ├── HollowHashIndex.java │ │ │ ├── HollowHashIndexBuilder.java │ │ │ ├── HollowHashIndexField.java │ │ │ ├── HollowHashIndexResult.java │ │ │ ├── HollowPrefixIndex.java │ │ │ ├── HollowPreindexer.java │ │ │ ├── HollowPrimaryKeyIndex.java │ │ │ ├── HollowSparseIntegerSet.java │ │ │ ├── HollowUniqueKeyIndex.java │ │ │ ├── MultiLinkedElementArray.java │ │ │ ├── TST.java │ │ │ ├── TestableUniqueKeyIndex.java │ │ │ ├── key │ │ │ │ ├── HollowPrimaryKeyValueDeriver.java │ │ │ │ ├── PrimaryKey.java │ │ │ │ └── PrimaryKeyValueHasher.java │ │ │ └── traversal │ │ │ │ ├── HollowIndexerCollectionTraversalNode.java │ │ │ │ ├── HollowIndexerListTraversalNode.java │ │ │ │ ├── HollowIndexerMapTraversalNode.java │ │ │ │ ├── HollowIndexerObjectFieldTraversalNode.java │ │ │ │ ├── HollowIndexerObjectTraversalNode.java │ │ │ │ ├── HollowIndexerTraversalNode.java │ │ │ │ ├── HollowIndexerValueTraverser.java │ │ │ │ └── TraversalTreeBuilder.java │ │ ├── memory │ │ │ ├── ArrayByteData.java │ │ │ ├── ByteArrayOrdinalMap.java │ │ │ ├── ByteData.java │ │ │ ├── ByteDataArray.java │ │ │ ├── EncodedByteBuffer.java │ │ │ ├── FixedLengthData.java │ │ │ ├── FixedLengthDataFactory.java │ │ │ ├── FreeOrdinalTracker.java │ │ │ ├── HollowUnsafeHandle.java │ │ │ ├── MemoryMode.java │ │ │ ├── SegmentedByteArray.java │ │ │ ├── SegmentedLongArray.java │ │ │ ├── ThreadSafeBitSet.java │ │ │ ├── VariableLengthData.java │ │ │ ├── VariableLengthDataFactory.java │ │ │ ├── encoding │ │ │ │ ├── BlobByteBuffer.java │ │ │ │ ├── EncodedLongBuffer.java │ │ │ │ ├── FixedLengthElementArray.java │ │ │ │ ├── FixedLengthMultipleOccurrenceElementArray.java │ │ │ │ ├── GapEncodedVariableLengthIntegerReader.java │ │ │ │ ├── HashCodes.java │ │ │ │ ├── VarInt.java │ │ │ │ └── ZigZag.java │ │ │ └── pool │ │ │ │ ├── ArraySegmentRecycler.java │ │ │ │ ├── GarbageCollectorAwareRecycler.java │ │ │ │ ├── RecyclingRecycler.java │ │ │ │ └── WastefulRecycler.java │ │ ├── read │ │ │ ├── HollowBlobInput.java │ │ │ ├── HollowReadFieldUtils.java │ │ │ ├── OptionalBlobPartInput.java │ │ │ ├── dataaccess │ │ │ │ ├── HollowCollectionTypeDataAccess.java │ │ │ │ ├── HollowDataAccess.java │ │ │ │ ├── HollowListTypeDataAccess.java │ │ │ │ ├── HollowMapTypeDataAccess.java │ │ │ │ ├── HollowObjectTypeDataAccess.java │ │ │ │ ├── HollowSetTypeDataAccess.java │ │ │ │ ├── HollowTypeDataAccess.java │ │ │ │ ├── disabled │ │ │ │ │ ├── HollowDisabledDataAccess.java │ │ │ │ │ ├── HollowListDisabledDataAccess.java │ │ │ │ │ ├── HollowMapDisabledDataAccess.java │ │ │ │ │ ├── HollowObjectDisabledDataAccess.java │ │ │ │ │ └── HollowSetDisabledDataAccess.java │ │ │ │ ├── missing │ │ │ │ │ ├── HollowListMissingDataAccess.java │ │ │ │ │ ├── HollowMapMissingDataAccess.java │ │ │ │ │ ├── HollowObjectMissingDataAccess.java │ │ │ │ │ └── HollowSetMissingDataAccess.java │ │ │ │ └── proxy │ │ │ │ │ ├── HollowListProxyDataAccess.java │ │ │ │ │ ├── HollowMapProxyDataAccess.java │ │ │ │ │ ├── HollowObjectProxyDataAccess.java │ │ │ │ │ ├── HollowProxyDataAccess.java │ │ │ │ │ ├── HollowSetProxyDataAccess.java │ │ │ │ │ └── HollowTypeProxyDataAccess.java │ │ │ ├── engine │ │ │ │ ├── HollowBlobHeaderReader.java │ │ │ │ ├── HollowBlobReader.java │ │ │ │ ├── HollowCollectionTypeReadState.java │ │ │ │ ├── HollowReadStateEngine.java │ │ │ │ ├── HollowTypeDataElements.java │ │ │ │ ├── HollowTypeDataElementsJoiner.java │ │ │ │ ├── HollowTypeDataElementsSplitter.java │ │ │ │ ├── HollowTypeReadState.java │ │ │ │ ├── HollowTypeReadStateShard.java │ │ │ │ ├── HollowTypeReshardingStrategy.java │ │ │ │ ├── HollowTypeStateListener.java │ │ │ │ ├── PopulatedOrdinalListener.java │ │ │ │ ├── SetMapKeyHasher.java │ │ │ │ ├── ShardsHolder.java │ │ │ │ ├── SnapshotPopulatedOrdinalsReader.java │ │ │ │ ├── list │ │ │ │ │ ├── HollowListDeltaApplicator.java │ │ │ │ │ ├── HollowListDeltaHistoricalStateCreator.java │ │ │ │ │ ├── HollowListTypeDataElements.java │ │ │ │ │ ├── HollowListTypeDataElementsJoiner.java │ │ │ │ │ ├── HollowListTypeDataElementsSplitter.java │ │ │ │ │ ├── HollowListTypeReadState.java │ │ │ │ │ ├── HollowListTypeReadStateShard.java │ │ │ │ │ ├── HollowListTypeReshardingStrategy.java │ │ │ │ │ └── HollowListTypeShardsHolder.java │ │ │ │ ├── map │ │ │ │ │ ├── HollowMapDeltaApplicator.java │ │ │ │ │ ├── HollowMapDeltaHistoricalStateCreator.java │ │ │ │ │ ├── HollowMapTypeDataElements.java │ │ │ │ │ ├── HollowMapTypeDataElementsJoiner.java │ │ │ │ │ ├── HollowMapTypeDataElementsSplitter.java │ │ │ │ │ ├── HollowMapTypeReadState.java │ │ │ │ │ ├── HollowMapTypeReadStateShard.java │ │ │ │ │ ├── HollowMapTypeReshardingStrategy.java │ │ │ │ │ ├── HollowMapTypeShardsHolder.java │ │ │ │ │ └── PotentialMatchHollowMapEntryOrdinalIteratorImpl.java │ │ │ │ ├── object │ │ │ │ │ ├── HollowObjectDeltaApplicator.java │ │ │ │ │ ├── HollowObjectDeltaHistoricalStateCreator.java │ │ │ │ │ ├── HollowObjectTypeDataElements.java │ │ │ │ │ ├── HollowObjectTypeDataElementsJoiner.java │ │ │ │ │ ├── HollowObjectTypeDataElementsSplitter.java │ │ │ │ │ ├── HollowObjectTypeReadState.java │ │ │ │ │ ├── HollowObjectTypeReadStateShard.java │ │ │ │ │ ├── HollowObjectTypeReshardingStrategy.java │ │ │ │ │ └── HollowObjectTypeShardsHolder.java │ │ │ │ └── set │ │ │ │ │ ├── HollowSetDeltaApplicator.java │ │ │ │ │ ├── HollowSetDeltaHistoricalStateCreator.java │ │ │ │ │ ├── HollowSetTypeDataElements.java │ │ │ │ │ ├── HollowSetTypeDataElementsJoiner.java │ │ │ │ │ ├── HollowSetTypeDataElementsSplitter.java │ │ │ │ │ ├── HollowSetTypeReadState.java │ │ │ │ │ ├── HollowSetTypeReadStateShard.java │ │ │ │ │ ├── HollowSetTypeReshardingStrategy.java │ │ │ │ │ ├── HollowSetTypeShardsHolder.java │ │ │ │ │ └── PotentialMatchHollowSetOrdinalIterator.java │ │ │ ├── filter │ │ │ │ ├── HollowFilterConfig.java │ │ │ │ └── TypeFilter.java │ │ │ ├── iterator │ │ │ │ ├── EmptyMapOrdinalIterator.java │ │ │ │ ├── EmptyOrdinalIterator.java │ │ │ │ ├── HollowListOrdinalIterator.java │ │ │ │ ├── HollowMapEntryOrdinalIterator.java │ │ │ │ ├── HollowMapEntryOrdinalIteratorImpl.java │ │ │ │ ├── HollowOrdinalIterator.java │ │ │ │ └── HollowSetOrdinalIterator.java │ │ │ └── missing │ │ │ │ ├── DefaultMissingDataHandler.java │ │ │ │ └── MissingDataHandler.java │ │ ├── schema │ │ │ ├── HollowCollectionSchema.java │ │ │ ├── HollowListSchema.java │ │ │ ├── HollowMapSchema.java │ │ │ ├── HollowObjectSchema.java │ │ │ ├── HollowSchema.java │ │ │ ├── HollowSchemaHash.java │ │ │ ├── HollowSchemaParser.java │ │ │ ├── HollowSchemaSorter.java │ │ │ ├── HollowSetSchema.java │ │ │ └── SimpleHollowDataset.java │ │ ├── type │ │ │ ├── BooleanHollowFactory.java │ │ │ ├── BooleanTypeAPI.java │ │ │ ├── DoubleHollowFactory.java │ │ │ ├── DoubleTypeAPI.java │ │ │ ├── FloatHollowFactory.java │ │ │ ├── FloatTypeAPI.java │ │ │ ├── HBoolean.java │ │ │ ├── HDouble.java │ │ │ ├── HFloat.java │ │ │ ├── HInteger.java │ │ │ ├── HLong.java │ │ │ ├── HString.java │ │ │ ├── IntegerHollowFactory.java │ │ │ ├── IntegerTypeAPI.java │ │ │ ├── LongHollowFactory.java │ │ │ ├── LongTypeAPI.java │ │ │ ├── StringHollowFactory.java │ │ │ ├── StringTypeAPI.java │ │ │ ├── accessor │ │ │ │ ├── BooleanDataAccessor.java │ │ │ │ ├── DoubleDataAccessor.java │ │ │ │ ├── FloatDataAccessor.java │ │ │ │ ├── IntegerDataAccessor.java │ │ │ │ ├── LongDataAccessor.java │ │ │ │ └── StringDataAccessor.java │ │ │ └── delegate │ │ │ │ ├── BooleanDelegate.java │ │ │ │ ├── BooleanDelegateCachedImpl.java │ │ │ │ ├── BooleanDelegateLookupImpl.java │ │ │ │ ├── DoubleDelegate.java │ │ │ │ ├── DoubleDelegateCachedImpl.java │ │ │ │ ├── DoubleDelegateLookupImpl.java │ │ │ │ ├── FloatDelegate.java │ │ │ │ ├── FloatDelegateCachedImpl.java │ │ │ │ ├── FloatDelegateLookupImpl.java │ │ │ │ ├── IntegerDelegate.java │ │ │ │ ├── IntegerDelegateCachedImpl.java │ │ │ │ ├── IntegerDelegateLookupImpl.java │ │ │ │ ├── LongDelegate.java │ │ │ │ ├── LongDelegateCachedImpl.java │ │ │ │ ├── LongDelegateLookupImpl.java │ │ │ │ ├── StringDelegate.java │ │ │ │ ├── StringDelegateCachedImpl.java │ │ │ │ └── StringDelegateLookupImpl.java │ │ ├── util │ │ │ ├── AllHollowRecordCollection.java │ │ │ ├── BitSetIterator.java │ │ │ ├── DefaultHashCodeFinder.java │ │ │ ├── HollowObjectHashCodeFinder.java │ │ │ ├── HollowRecordCollection.java │ │ │ ├── HollowWriteStateCreator.java │ │ │ ├── IOUtils.java │ │ │ ├── IntList.java │ │ │ ├── IntMap.java │ │ │ ├── LongList.java │ │ │ ├── RemovedOrdinalIterator.java │ │ │ ├── SimultaneousExecutor.java │ │ │ ├── StateEngineRoundTripper.java │ │ │ ├── Threads.java │ │ │ └── Versions.java │ │ └── write │ │ │ ├── FieldStatistics.java │ │ │ ├── HollowBlobHeaderWriter.java │ │ │ ├── HollowBlobWriter.java │ │ │ ├── HollowHashableWriteRecord.java │ │ │ ├── HollowListTypeWriteState.java │ │ │ ├── HollowListWriteRecord.java │ │ │ ├── HollowMapTypeWriteState.java │ │ │ ├── HollowMapWriteRecord.java │ │ │ ├── HollowObjectTypeWriteState.java │ │ │ ├── HollowObjectWriteRecord.java │ │ │ ├── HollowSetTypeWriteState.java │ │ │ ├── HollowSetWriteRecord.java │ │ │ ├── HollowTypeWriteState.java │ │ │ ├── HollowWriteRecord.java │ │ │ ├── HollowWriteStateEngine.java │ │ │ ├── HollowWriteStateEnginePrimaryKeyHasher.java │ │ │ ├── copy │ │ │ ├── HollowListCopier.java │ │ │ ├── HollowMapCopier.java │ │ │ ├── HollowObjectCopier.java │ │ │ ├── HollowRecordCopier.java │ │ │ └── HollowSetCopier.java │ │ │ └── objectmapper │ │ │ ├── HollowHashKey.java │ │ │ ├── HollowInline.java │ │ │ ├── HollowListTypeMapper.java │ │ │ ├── HollowMapTypeMapper.java │ │ │ ├── HollowObjectMapper.java │ │ │ ├── HollowObjectTypeMapper.java │ │ │ ├── HollowPrimaryKey.java │ │ │ ├── HollowSetTypeMapper.java │ │ │ ├── HollowShardLargeType.java │ │ │ ├── HollowTransient.java │ │ │ ├── HollowTypeMapper.java │ │ │ ├── HollowTypeName.java │ │ │ ├── MemoizedList.java │ │ │ ├── MemoizedMap.java │ │ │ ├── MemoizedSet.java │ │ │ ├── NullablePrimitiveBoolean.java │ │ │ ├── RecordPrimaryKey.java │ │ │ └── flatrecords │ │ │ ├── FlatRecord.java │ │ │ ├── FlatRecordDumper.java │ │ │ ├── FlatRecordExtractor.java │ │ │ ├── FlatRecordOrdinalReader.java │ │ │ ├── FlatRecordReader.java │ │ │ ├── FlatRecordWriter.java │ │ │ ├── HollowSchemaIdentifierMapper.java │ │ │ └── traversal │ │ │ ├── FlatRecordTraversalListNode.java │ │ │ ├── FlatRecordTraversalMapNode.java │ │ │ ├── FlatRecordTraversalNode.java │ │ │ ├── FlatRecordTraversalObjectNode.java │ │ │ ├── FlatRecordTraversalObjectNodeEquality.java │ │ │ └── FlatRecordTraversalSetNode.java │ │ └── tools │ │ ├── checksum │ │ └── HollowChecksum.java │ │ ├── combine │ │ ├── HollowCombiner.java │ │ ├── HollowCombinerCopyDirector.java │ │ ├── HollowCombinerExcludeOrdinalsCopyDirector.java │ │ ├── HollowCombinerExcludePrimaryKeysCopyDirector.java │ │ ├── HollowCombinerIncludeOrdinalsCopyDirector.java │ │ ├── HollowCombinerIncludePrimaryKeysCopyDirector.java │ │ ├── HollowCombinerOrdinalRemapper.java │ │ ├── HollowCombinerPrimaryKeyOrdinalRemapper.java │ │ ├── IdentityOrdinalRemapper.java │ │ └── OrdinalRemapper.java │ │ ├── compact │ │ └── HollowCompactor.java │ │ ├── diff │ │ ├── HollowDiff.java │ │ ├── HollowDiffMatcher.java │ │ ├── HollowDiffNodeIdentifier.java │ │ ├── HollowDiffRecordFieldExtractor.java │ │ ├── HollowTypeDiff.java │ │ ├── count │ │ │ ├── HollowDiffCollectionCountingNode.java │ │ │ ├── HollowDiffCountingNode.java │ │ │ ├── HollowDiffFieldCountingNode.java │ │ │ ├── HollowDiffMapCountingNode.java │ │ │ ├── HollowDiffMissingCountingNode.java │ │ │ ├── HollowDiffObjectCountingNode.java │ │ │ ├── HollowDiffShortcutTypeCountingNode.java │ │ │ └── HollowFieldDiff.java │ │ ├── exact │ │ │ ├── CombinedMatchPairResultsIterator.java │ │ │ ├── DiffEqualOrdinalFilter.java │ │ │ ├── DiffEqualOrdinalMap.java │ │ │ ├── DiffEqualityMapping.java │ │ │ └── mapper │ │ │ │ ├── DiffEqualityCollectionMapper.java │ │ │ │ ├── DiffEqualityMapMapper.java │ │ │ │ ├── DiffEqualityObjectMapper.java │ │ │ │ ├── DiffEqualityOrderedListMapper.java │ │ │ │ └── DiffEqualityTypeMapper.java │ │ └── specific │ │ │ └── HollowSpecificDiff.java │ │ ├── filter │ │ ├── FilteredHollowBlobWriter.java │ │ ├── FilteredHollowBlobWriterStreamAndFilter.java │ │ └── FixedLengthArrayWriter.java │ │ ├── history │ │ ├── DiffEqualityMappingOrdinalRemapper.java │ │ ├── HistoricalPrimaryKeyMatcher.java │ │ ├── HollowHistoricalListDataAccess.java │ │ ├── HollowHistoricalMapDataAccess.java │ │ ├── HollowHistoricalObjectDataAccess.java │ │ ├── HollowHistoricalSchemaChange.java │ │ ├── HollowHistoricalSetDataAccess.java │ │ ├── HollowHistoricalState.java │ │ ├── HollowHistoricalStateCreator.java │ │ ├── HollowHistoricalStateDataAccess.java │ │ ├── HollowHistoricalTypeDataAccess.java │ │ ├── HollowHistory.java │ │ ├── IntMapOrdinalRemapper.java │ │ └── keyindex │ │ │ ├── HollowHistoricalStateKeyOrdinalMapping.java │ │ │ ├── HollowHistoricalStateTypeKeyOrdinalMapping.java │ │ │ ├── HollowHistoryKeyIndex.java │ │ │ ├── HollowHistoryTypeKeyIndex.java │ │ │ └── HollowOrdinalMapper.java │ │ ├── patch │ │ ├── delta │ │ │ ├── HollowStateDeltaPatcher.java │ │ │ └── PartialOrdinalRemapper.java │ │ └── record │ │ │ ├── HollowPatcherCombinerCopyDirector.java │ │ │ ├── HollowStateEngineRecordPatcher.java │ │ │ └── TypeMatchSpec.java │ │ ├── query │ │ └── HollowFieldMatchQuery.java │ │ ├── split │ │ ├── HollowSplitter.java │ │ ├── HollowSplitterCopyDirector.java │ │ ├── HollowSplitterOrdinalCopyDirector.java │ │ ├── HollowSplitterOrdinalRemapper.java │ │ ├── HollowSplitterPrimaryKeyCopyDirector.java │ │ └── HollowSplitterShardCopier.java │ │ ├── stringifier │ │ ├── HollowRecordJsonStringifier.java │ │ ├── HollowRecordStringifier.java │ │ └── HollowStringifier.java │ │ ├── traverse │ │ └── TransitiveSetTraverser.java │ │ └── util │ │ ├── ObjectInternPool.java │ │ └── SearchUtils.java │ └── test │ ├── java │ └── com │ │ └── netflix │ │ └── hollow │ │ ├── api │ │ ├── client │ │ │ ├── HollowClientTest.java │ │ │ └── HollowClientUpdaterTest.java │ │ ├── codegen │ │ │ ├── AbstractHollowAPIGeneratorTest.java │ │ │ ├── ArgumentParserTest.java │ │ │ ├── HollowAPIGeneratorTest.java │ │ │ ├── HollowBooleanFieldErgonomicsAPIGeneratorTest.java │ │ │ ├── HollowCodeGenerationCompileUtil.java │ │ │ ├── HollowDataAccessorAPIGeneratorTest.java │ │ │ ├── HollowErgonomicAPIShortcutsTest.java │ │ │ ├── HollowMapAPIGeneratorTest.java │ │ │ ├── HollowPackageErgonomicsAPIGeneratorTest.java │ │ │ ├── HollowPrimaryKeyAPIGeneratorTest.java │ │ │ ├── HollowPrimitiveTypesAPIGeneratorTest.java │ │ │ ├── ScalarFieldCodeGenTest.java │ │ │ └── perfapi │ │ │ │ └── HollowPerformanceAPIGeneratorTest.java │ │ ├── consumer │ │ │ ├── AbstractHollowHashIndexTests.java │ │ │ ├── AbstractHollowUniqueKeyIndexTests.java │ │ │ ├── CustomConsumerBuilderTest.java │ │ │ ├── FailedTransitionTest.java │ │ │ ├── FailedTransitionTrackerTest.java │ │ │ ├── FocusedShardHoleFillTest.java │ │ │ ├── HollowConsumerBuilderTest.java │ │ │ ├── HollowProducerConsumerTests.java │ │ │ ├── HollowRefreshListenerTests.java │ │ │ ├── HollowUpdatePlanTest.java │ │ │ ├── HollowUpdatePlannerTest.java │ │ │ ├── InMemoryAnnouncement.java │ │ │ ├── LocalBlobStoreTest.java │ │ │ ├── data │ │ │ │ ├── AbstractPrimitiveTypeDataAccessorTest.java │ │ │ │ ├── BooleanDataAccessorTest.java │ │ │ │ ├── DoubleDataAccessorTest.java │ │ │ │ ├── FloatDataAccessorTest.java │ │ │ │ ├── HollowDataAccessorTest.java │ │ │ │ ├── IntegerDataAccessorTest.java │ │ │ │ ├── LongDataAccessorTest.java │ │ │ │ ├── PrimitiveTypeTestAPI.java │ │ │ │ └── StringDataAccessorTest.java │ │ │ ├── fs │ │ │ │ └── HollowFilesystemConsumerTest.java │ │ │ ├── index │ │ │ │ ├── DataModel.java │ │ │ │ ├── HashIndexTest.java │ │ │ │ ├── HashIndexUpdatesTest.java │ │ │ │ ├── UniqueKeyIndexTest.java │ │ │ │ └── UniqueKeyUpdatesTest.java │ │ │ └── metrics │ │ │ │ └── AbstractRefreshMetricsListenerTest.java │ │ ├── metrics │ │ │ ├── HollowConsumerMetricsTests.java │ │ │ ├── HollowMetricsCollectorTests.java │ │ │ └── HollowProducerMetricsTests.java │ │ ├── objects │ │ │ ├── delegate │ │ │ │ └── HollowMapCachedDelegateTest.java │ │ │ └── provider │ │ │ │ ├── HollowObjectCacheProviderTest.java │ │ │ │ └── Util.java │ │ └── producer │ │ │ ├── CustomProducerBuilderTest.java │ │ │ ├── HashCodeFinderTest.java │ │ │ ├── HollowIncrementalProducerMultithreadingTest.java │ │ │ ├── HollowIncrementalProducerTest.java │ │ │ ├── HollowProduceIncrementalMultithreadingTest.java │ │ │ ├── HollowProducerBlobStorageCleanerTest.java │ │ │ ├── HollowProducerFakeListener.java │ │ │ ├── HollowProducerIncrementalTest.java │ │ │ ├── HollowProducerListenerTest.java │ │ │ ├── HollowProducerTest.java │ │ │ ├── ProducerListenerSupportTest.java │ │ │ ├── SchemaChangeTest.java │ │ │ ├── WriteStateTest.java │ │ │ ├── enforcer │ │ │ └── BasicSingleProducerEnforcerTest.java │ │ │ ├── metrics │ │ │ └── AbstractProducerMetricsListenerTest.java │ │ │ ├── model │ │ │ ├── CustomReferenceType.java │ │ │ └── HasAllTypeStates.java │ │ │ └── validation │ │ │ ├── DuplicateDataDetectionValidatorTests.java │ │ │ ├── HollowProducerValidationListenerTest.java │ │ │ ├── ObjectModificationValidatorTest.java │ │ │ ├── ProducerValidationTests.java │ │ │ ├── RecordCountPercentChangeValidatorTests.java │ │ │ └── RecordCountVarianceValidatorTests.java │ │ ├── core │ │ ├── AbstractStateEngineTest.java │ │ ├── HollowDatasetTest.java │ │ ├── index │ │ │ ├── FieldPathTest.java │ │ │ ├── GrowingSegmentedLongArrayTest.java │ │ │ ├── HollowHashIndexLongevityTest.java │ │ │ ├── HollowHashIndexTest.java │ │ │ ├── HollowPrefixIndexTest.java │ │ │ ├── HollowPrimaryKeyIndexLongevityTest.java │ │ │ ├── HollowPrimaryKeyIndexTest.java │ │ │ ├── HollowSparseIntegerSetTest.java │ │ │ ├── HollowUniqueKeyIndexTest.java │ │ │ ├── MultiLinkedElementArrayTest.java │ │ │ ├── PrimaryKeyIndexDeltaIndexTest.java │ │ │ ├── PrimaryKeyTest.java │ │ │ ├── SparseBitSetTest.java │ │ │ └── traversal │ │ │ │ ├── HollowIndexTraversalTest.java │ │ │ │ └── HollowIndexerValueTraverserTest.java │ │ ├── memory │ │ │ ├── ByteArrayOrdinalTest.java │ │ │ ├── FreeOrdinalTrackerTest.java │ │ │ ├── ThreadSafeBitSetTest.java │ │ │ └── encoding │ │ │ │ ├── FixedLengthElementArrayTest.java │ │ │ │ ├── FixedLengthMultipleOccurrenceElementArrayTest.java │ │ │ │ ├── GapEncodedVariableLengthIntegerReaderTest.java │ │ │ │ ├── OnHeapArrayVsOffHeapBufferAcceptanceTest.java │ │ │ │ └── VarIntTest.java │ │ ├── read │ │ │ ├── HollowBlobHeaderTest.java │ │ │ ├── HollowBlobInputTest.java │ │ │ ├── HollowBlobOptionalPartTest.java │ │ │ ├── HollowBlobRandomizedTagTest.java │ │ │ ├── HollowReadFilterTest.java │ │ │ ├── HollowTypeStateListenerTest.java │ │ │ ├── SnapshotPopulatedOrdinalsReaderTest.java │ │ │ ├── engine │ │ │ │ ├── AbstractHollowTypeDataElementsSplitJoinTest.java │ │ │ │ ├── HollowTypeReshardingStrategyTest.java │ │ │ │ ├── list │ │ │ │ │ ├── AbstractHollowListTypeDataElementsSplitJoinTest.java │ │ │ │ │ ├── HollowListTypeDataElementsJoinerTest.java │ │ │ │ │ ├── HollowListTypeDataElementsSplitJoinTest.java │ │ │ │ │ ├── HollowListTypeDataElementsSplitterTest.java │ │ │ │ │ └── HollowListTypeReadStateTest.java │ │ │ │ ├── map │ │ │ │ │ ├── AbstractHollowMapTypeDataElementsSplitJoinTest.java │ │ │ │ │ ├── HollowMapTypeDataElementsJoinerTest.java │ │ │ │ │ ├── HollowMapTypeDataElementsSplitJoinTest.java │ │ │ │ │ ├── HollowMapTypeDataElementsSplitterTest.java │ │ │ │ │ └── HollowMapTypeReadStateTest.java │ │ │ │ ├── object │ │ │ │ │ ├── AbstractHollowObjectTypeDataElementsSplitJoinTest.java │ │ │ │ │ ├── HollowObjectTypeDataElementsJoinerTest.java │ │ │ │ │ ├── HollowObjectTypeDataElementsSplitJoinTest.java │ │ │ │ │ ├── HollowObjectTypeDataElementsSplitterTest.java │ │ │ │ │ └── HollowObjectTypeReadStateTest.java │ │ │ │ └── set │ │ │ │ │ ├── AbstractHollowSetTypeDataElementsSplitJoinTest.java │ │ │ │ │ ├── HollowSetTypeDataElementsJoinerTest.java │ │ │ │ │ ├── HollowSetTypeDataElementsSplitJoinTest.java │ │ │ │ │ ├── HollowSetTypeDataElementsSplitterTest.java │ │ │ │ │ └── HollowSetTypeReadStateTest.java │ │ │ ├── filter │ │ │ │ ├── HollowFilterConfigTest.java │ │ │ │ └── TypeFilterTest.java │ │ │ ├── list │ │ │ │ ├── HollowListCollectionTest.java │ │ │ │ ├── HollowListDeltaTest.java │ │ │ │ ├── HollowListFastDeltaTest.java │ │ │ │ └── HollowListShardedTest.java │ │ │ ├── map │ │ │ │ ├── HollowMapCollectionTest.java │ │ │ │ ├── HollowMapDeltaTest.java │ │ │ │ ├── HollowMapFastDeltaTest.java │ │ │ │ ├── HollowMapHashKeyTest.java │ │ │ │ ├── HollowMapLargeTest.java │ │ │ │ └── HollowMapShardedTest.java │ │ │ ├── missing │ │ │ │ ├── FakeMissingHollowRecord.java │ │ │ │ ├── MissingListTest.java │ │ │ │ ├── MissingMapTest.java │ │ │ │ ├── MissingObjectFieldDefaultsTests.java │ │ │ │ └── MissingSetTest.java │ │ │ ├── object │ │ │ │ ├── HollowObjectDeltaTest.java │ │ │ │ ├── HollowObjectExactBitBoundaryEdgeCaseTest.java │ │ │ │ ├── HollowObjectLargeFieldSizeTest.java │ │ │ │ ├── HollowObjectLargeFieldTest.java │ │ │ │ ├── HollowObjectNullStringValueTest.java │ │ │ │ ├── HollowObjectRemovalTest.java │ │ │ │ ├── HollowObjectReverseDeltaTest.java │ │ │ │ ├── HollowObjectReverseDeltaVarLengthFieldTest.java │ │ │ │ ├── HollowObjectShardedTest.java │ │ │ │ ├── HollowObjectStringEqualityTest.java │ │ │ │ └── HollowObjectVarLengthFieldRemovalTest.java │ │ │ └── set │ │ │ │ ├── HollowSetCollectionTest.java │ │ │ │ ├── HollowSetDeltaTest.java │ │ │ │ ├── HollowSetFastDeltaTest.java │ │ │ │ ├── HollowSetHashKeyTest.java │ │ │ │ ├── HollowSetShardedTest.java │ │ │ │ └── HollowSetTest.java │ │ ├── schema │ │ │ ├── HollowMapSchemaTest.java │ │ │ ├── HollowObjectSchemaTest.java │ │ │ ├── HollowSchemaHashTest.java │ │ │ ├── HollowSchemaParserTest.java │ │ │ ├── HollowSchemaSorterTest.java │ │ │ ├── HollowSchemaTest.java │ │ │ └── HollowSetSchemaTest.java │ │ ├── util │ │ │ ├── BitSetIteratorTest.java │ │ │ ├── HashCodesTest.java │ │ │ ├── HollowWriteStateCreatorTest.java │ │ │ ├── RemovedOrdinalIteratorTest.java │ │ │ ├── SimultaneousExecutorTest.java │ │ │ ├── ThreadsTest.java │ │ │ └── VersionsTest.java │ │ └── write │ │ │ ├── DefinedHashHeadersTest.java │ │ │ ├── EmptyTypeSnapshotTest.java │ │ │ ├── HollowObjectWriteRecordTest.java │ │ │ ├── HollowTypeWriteStateTest.java │ │ │ ├── HollowWriteStateEngineTest.java │ │ │ ├── MissingHashKeyInWriteStateTest.java │ │ │ ├── NegativeFloatTest.java │ │ │ ├── ResetToLastPreparedForNextCycleTest.java │ │ │ ├── objectmapper │ │ │ ├── DirectCircularReference.java │ │ │ ├── DirectListCircularReference.java │ │ │ ├── DirectMapCircularReference.java │ │ │ ├── DirectSetCircularReference.java │ │ │ ├── HollowObjectMapperFlatRecordParserTest.java │ │ │ ├── HollowObjectMapperFlatRecordTraversalNodeParserTest.java │ │ │ ├── HollowObjectMapperHollowRecordParserTest.java │ │ │ ├── HollowObjectMapperPrimaryKeyExtractionTests.java │ │ │ ├── HollowObjectMapperTest.java │ │ │ ├── HollowObjectTypeMapperCompressedStringTest.java │ │ │ ├── IndirectCircularReference.java │ │ │ ├── ReuseMemoizedObjectsAcrossCyclesTest.java │ │ │ ├── TypeA.java │ │ │ ├── TypeB.java │ │ │ ├── TypeC.java │ │ │ ├── TypeD.java │ │ │ ├── TypeE.java │ │ │ ├── TypeWithAllFieldTypes.java │ │ │ └── flatrecords │ │ │ │ ├── FakeHollowIdentifierMapper.java │ │ │ │ ├── FakeHollowSchemaIdentifierMapper.java │ │ │ │ ├── FlatRecordWriterTests.java │ │ │ │ └── traversal │ │ │ │ ├── FlatRecordTraversalNodeTest.java │ │ │ │ └── FlatRecordTraversalObjectNodeEqualityTest.java │ │ │ └── restore │ │ │ ├── RestoreWriteStateEngineChangingSchemaTest.java │ │ │ ├── RestoreWriteStateEngineFieldAdditionSplitsOrdinals.java │ │ │ ├── RestoreWriteStateEngineFieldRemovalCollapsesOrdinals.java │ │ │ ├── RestoreWriteStateEngineHierarchyScenario.java │ │ │ ├── RestoreWriteStateEngineListTest.java │ │ │ ├── RestoreWriteStateEngineMapReverseDeltaTest.java │ │ │ ├── RestoreWriteStateEngineMapTest.java │ │ │ ├── RestoreWriteStateEngineObjectTest.java │ │ │ ├── RestoreWriteStateEngineSetReverseDeltaTest.java │ │ │ └── RestoreWriteStateEngineSetTest.java │ │ ├── test │ │ ├── dto │ │ │ ├── kitchensink │ │ │ │ └── KitchenSink.java │ │ │ └── movie │ │ │ │ ├── Award.java │ │ │ │ ├── CastMember.java │ │ │ │ ├── CastRole.java │ │ │ │ ├── Country.java │ │ │ │ ├── MaturityRating.java │ │ │ │ ├── Movie.java │ │ │ │ ├── Tag.java │ │ │ │ └── TagValue.java │ │ ├── generated │ │ │ ├── Award.java │ │ │ ├── AwardDataAccessor.java │ │ │ ├── AwardDelegate.java │ │ │ ├── AwardDelegateCachedImpl.java │ │ │ ├── AwardDelegateLookupImpl.java │ │ │ ├── AwardHollowFactory.java │ │ │ ├── AwardPrimaryKeyIndex.java │ │ │ ├── AwardTypeAPI.java │ │ │ ├── AwardsAPI.java │ │ │ ├── AwardsAPIFactory.java │ │ │ ├── AwardsAPIHashIndex.java │ │ │ ├── Movie.java │ │ │ ├── MovieDataAccessor.java │ │ │ ├── MovieDelegate.java │ │ │ ├── MovieDelegateCachedImpl.java │ │ │ ├── MovieDelegateLookupImpl.java │ │ │ ├── MovieHollowFactory.java │ │ │ ├── MoviePrimaryKeyIndex.java │ │ │ ├── MovieTypeAPI.java │ │ │ ├── SetOfMovie.java │ │ │ ├── SetOfMovieHollowFactory.java │ │ │ └── SetOfMovieTypeAPI.java │ │ └── model │ │ │ ├── Award.java │ │ │ └── Movie.java │ │ └── tools │ │ ├── checksum │ │ └── HollowChecksumTest.java │ │ ├── combine │ │ ├── HollowCombinerFilteredReferencedTypeTest.java │ │ ├── HollowCombinerIgnoreTest.java │ │ ├── HollowCombinerMissingTypeWithPrimaryKeyTest.java │ │ ├── HollowCombinerPrimaryKeyTests.java │ │ └── HollowCombinerTest.java │ │ ├── diff │ │ ├── HollowDiffChangedSchemaTest.java │ │ ├── HollowDiffMatcherTest.java │ │ ├── HollowDiffShortcutTest.java │ │ ├── HollowDiffTest.java │ │ └── exact │ │ │ ├── DiffEqualOrdinalFilterTest.java │ │ │ └── DiffEqualOrdinalMapTest.java │ │ ├── filter │ │ └── FilteredHollowBlobWriterTest.java │ │ ├── history │ │ ├── HollowHistoryHashKeyTest.java │ │ ├── HollowHistoryKeyIndexTest.java │ │ ├── HollowHistoryListTest.java │ │ ├── HollowHistoryMapTest.java │ │ ├── HollowHistoryRehashTest.java │ │ ├── HollowHistorySetTest.java │ │ └── HollowHistoryTest.java │ │ ├── patch │ │ └── delta │ │ │ └── HollowStateDeltaPatcherTest.java │ │ ├── query │ │ └── HollowFieldMatchQueryTest.java │ │ ├── stringifier │ │ ├── AbstractHollowRecordStringifierTest.java │ │ ├── HollowRecordJsonStringifierTest.java │ │ └── HollowRecordStringifierTest.java │ │ └── util │ │ ├── ObjectInternPoolTest.java │ │ └── SearchUtilsTest.java │ └── resources │ ├── findbugs_exclude.xml │ └── schema1.txt ├── logo.png ├── mkdocs.yml ├── requirements.txt └── settings.gradle /.github/workflows/nebula-snapshot.yml: -------------------------------------------------------------------------------- 1 | name: Snapshot 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | with: 14 | fetch-depth: 0 15 | - name: Setup git user 16 | run: | 17 | git config --global user.name "Netflix OSS Maintainers" 18 | git config --global user.email "netflixoss@netflix.com" 19 | - name: Set up JDK 20 | uses: actions/setup-java@v1 21 | with: 22 | java-version: 8 23 | - uses: actions/cache@v4 24 | id: gradle-cache 25 | with: 26 | path: | 27 | ~/.gradle/caches 28 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 29 | - uses: actions/cache@v4 30 | id: gradle-wrapper-cache 31 | with: 32 | path: | 33 | ~/.gradle/wrapper 34 | key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} 35 | - name: Build 36 | run: ./gradlew build snapshot 37 | env: 38 | NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }} 39 | NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }} 40 | NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }} 41 | NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }} 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/build/ 2 | **/bin/ 3 | **/out/ 4 | **/.classpath 5 | **/.project 6 | **/.settings 7 | .gradle 8 | **.ipr 9 | **.iml 10 | **.iws 11 | .idea 12 | venv 13 | 14 | # publishing secrets 15 | secrets/signing-key 16 | 17 | **/.DS_Store 18 | -------------------------------------------------------------------------------- /.makefile.identity.inc: -------------------------------------------------------------------------------- 1 | 2 | ██╗ ██╗ ██████╗ ██╗ ██╗ ██████╗ ██╗ ██╗ 3 | ██║ ██║██╔═══██╗██║ ██║ ██╔═══██╗██║ ██║ 4 | ███████║██║ ██║██║ ██║ ██║ ██║██║ █╗ ██║ 5 | ██╔══██║██║ ██║██║ ██║ ██║ ██║██║███╗██║ 6 | ██║ ██║╚██████╔╝███████╗███████╗╚██████╔╝╚███╔███╔╝ 7 | ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝ ╚═════╝ ╚══╝╚══╝ 8 | Netflix Hollow 9 | -------------------------------------------------------------------------------- /.makefile.inc: -------------------------------------------------------------------------------- 1 | # Available colors 2 | RED := $(shell tput -Txterm setaf 1) 3 | GREEN := $(shell tput -Txterm setaf 2) 4 | YELLOW := $(shell tput -Txterm setaf 3) 5 | BLUE := $(shell tput -Txterm setaf 4) 6 | WHITE := $(shell tput -Txterm setaf 7) 7 | RESET := $(shell tput -Txterm sgr0) 8 | 9 | 10 | define HELP_SCRIPT 11 | if ((/^```/ && $$p > 0) || /^```ascii/) { $$p++; next }; 12 | print $$_ if ($$p == 1); 13 | if (/^([A-Za-z0-9_-]+[%]?)*:.*## (.*)/) {printf "${GREEN}%-${TARGET_MAX_CHAR_NUM}s${BLUE}: %s${RESET}\n", $$1, $$2 }; 14 | if (/^###?/) { printf "\n" } 15 | endef 16 | export HELP_SCRIPT 17 | 18 | define SHOW_IDENTITY 19 | @[ -f ./.makefile.identity.inc ] && printf "${RED}" && cat ./.makefile.identity.inc; echo ''; echo '' || echo '' && printf "${RESET}" 20 | endef 21 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Change log is maintained at https://github.com/Netflix/hollow/releases 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Hollow 2 | 3 | If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request. When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. 4 | 5 | See also [hollow.how/community/#contributing-to-hollow](http://hollow.how/community/#contributing-to-hollow). 6 | 7 | ## License 8 | 9 | By contributing your code, you agree to license your contribution under the terms of the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0). Your contributions should also include the following header: 10 | 11 | ``` 12 | /** 13 | * Copyright 2016 the original author or authors. 14 | * 15 | * Licensed under the Apache License, Version 2.0 (the "License"); 16 | * you may not use this file except in compliance with the License. 17 | * You may obtain a copy of the License at 18 | * 19 | * http://www.apache.org/licenses/LICENSE-2.0 20 | * 21 | * Unless required by applicable law or agreed to in writing, software 22 | * distributed under the License is distributed on an "AS IS" BASIS, 23 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 | * See the License for the specific language governing permissions and 25 | * limitations under the License. 26 | */ 27 | ``` 28 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include .makefile.inc 2 | 3 | .PHONY: venv build test clean all docs help 4 | .DEFAULT_GOAL := help 5 | 6 | SHELL = /bin/sh 7 | PROJECT_NAME := $(SHELl basename $(CURDIR)) 8 | 9 | # Define access to common tools 10 | GRADLE = ./gradlew 11 | 12 | # Python 13 | VENV_NAME ?= .venv 14 | VENV_ACTIVATE = . $(VENV_NAME)/bin/activate 15 | PYTHON = ${VENV_NAME}/bin/python3 16 | PIP = ${VENV_NAME}/bin/pip 17 | MKDOCS = ${VENV_NAME}/bin/mkdocs 18 | 19 | venv: $(VENV_NAME)/bin/activate 20 | 21 | $(VENV_NAME)/bin/activate: requirements.txt 22 | test -d $(VENV_NAME) || virtualenv -p python3 $(VENV_NAME) 23 | ${PYTHON} -m pip install -Ur requirements.txt 24 | touch $(VENV_NAME)/bin/activate 25 | 26 | build: ## builds the project. 27 | $(GRADLE) build 28 | 29 | test: ## runs all tests. 30 | $(GRADLE) testAll 31 | 32 | clean: ## Cleans the project. 33 | $(GRADLE) clean 34 | 35 | site-build: venv ## Builds the doc site. 36 | $(MKDOCS) build 37 | 38 | site-serve: venv ## Serves the doc site locally 39 | $(MKDOCS) serve 40 | 41 | site-deploy: site-build ## Deploys the site to Github pages. 42 | $(MKDOCS) gh-deploy 43 | 44 | site-clean: venv ## Removes the site directory 45 | rm -rf site 46 | 47 | 48 | .PHONY: help 49 | help: ## List all available commands. 50 | ${SHOW_IDENTITY} 51 | @echo 'Usage:' 52 | @echo '${BLUE}make${RESET} ${GREEN}${RESET}' 53 | @echo '' 54 | @echo 'Targets:' 55 | @perl -ne "$${HELP_SCRIPT}" $(MAKEFILE_LIST) 56 | -------------------------------------------------------------------------------- /OSSMETADATA: -------------------------------------------------------------------------------- 1 | osslifecycle=active 2 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { mavenCentral() } 3 | } 4 | 5 | plugins { 6 | id 'com.netflix.nebula.netflixoss' version '11.5.0' 7 | } 8 | 9 | subprojects { 10 | apply plugin: 'nebula.netflixoss' 11 | 12 | java { 13 | toolchain { 14 | languageVersion = JavaLanguageVersion.of(8) 15 | } 16 | } 17 | 18 | tasks.withType(Javadoc) { 19 | options.tags( 20 | 'apiNote:a:API Note:', 21 | 'implSpec:a:Implementation Requirements:', 22 | 'implNote:a:Implementation Note:') 23 | } 24 | 25 | group = 'com.netflix.hollow' 26 | 27 | repositories { 28 | mavenCentral() 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /config/checkstyle/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /config/checkstyle/suppression.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 21 | 22 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /dependencies.lock: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /deploy_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Simple script to deploy the doc site. Note that this will run the mkdocs generator 4 | # and then directly push to github. 5 | make site-deploy 6 | # Clean the site. 7 | make site-clean 8 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | hollow.how 2 | -------------------------------------------------------------------------------- /docs/OSSMETADATA: -------------------------------------------------------------------------------- 1 | osslifecycle=active 2 | -------------------------------------------------------------------------------- /docs/acknowledgements.md: -------------------------------------------------------------------------------- 1 | Hollow is originally created by Drew Koszewnik with the advice and support of fellow members of the Data Platform Technologies team at Netflix: 2 | 3 | * David Su 4 | * Deva Jayaraman 5 | * Jatin Shah 6 | * Kinesh Satiya 7 | * Lavanya Kanchanapalli 8 | * Ramin Forood 9 | * Rohit Kaul 10 | * Tim Taylor 11 | 12 | Hollow is maintained by the Data Platform Technologies team at Netflix. 13 | 14 | Hollow makes use of an [implementation](https://github.com/yonik/java_util/blob/master/src/util/hash/MurmurHash3.java) of the MurmurHash3 algorithm authored by Yonik Seeley. 15 | 16 | Hollow makes use of Thomas Wang's well known 32-bit mix function, which is based on an original suggestion by Robert Jenkins. 17 | 18 | The _hollow-diff-ui_ object diff view was inspired in part by Chas Emerick's [jsdifflib](http://github.com/cemerick/jsdifflib), and borrows some of the .css from that project. 19 | 20 | This documentation was created with [MkDocs](http://www.mkdocs.org), using a theme from [material](https://github.com/Netflix/hollow). 21 | -------------------------------------------------------------------------------- /docs/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/assets/images/favicon.png -------------------------------------------------------------------------------- /docs/css/extra.css: -------------------------------------------------------------------------------- 1 | .md-grid { 2 | max-width: 80%; 3 | } 4 | -------------------------------------------------------------------------------- /docs/img/aws-attach-existing-policies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-attach-existing-policies.png -------------------------------------------------------------------------------- /docs/img/aws-attach-policy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-attach-policy.png -------------------------------------------------------------------------------- /docs/img/aws-create-s3-bucket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-create-s3-bucket.png -------------------------------------------------------------------------------- /docs/img/aws-create-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-create-user.png -------------------------------------------------------------------------------- /docs/img/aws-dynamodb-create-table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-dynamodb-create-table.png -------------------------------------------------------------------------------- /docs/img/aws-dynamodb-scan-table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-dynamodb-scan-table.png -------------------------------------------------------------------------------- /docs/img/aws-s3-full-access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-s3-full-access.png -------------------------------------------------------------------------------- /docs/img/aws-select-dynamodb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-select-dynamodb.png -------------------------------------------------------------------------------- /docs/img/aws-select-iam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-select-iam.png -------------------------------------------------------------------------------- /docs/img/aws-select-s3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-select-s3.png -------------------------------------------------------------------------------- /docs/img/aws-user-review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/aws-user-review.png -------------------------------------------------------------------------------- /docs/img/corner-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/corner-logo.png -------------------------------------------------------------------------------- /docs/img/explorer-augmentsearchresult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/explorer-augmentsearchresult.png -------------------------------------------------------------------------------- /docs/img/explorer-browseschema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/explorer-browseschema.png -------------------------------------------------------------------------------- /docs/img/explorer-browsesearchresult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/explorer-browsesearchresult.png -------------------------------------------------------------------------------- /docs/img/explorer-browsetype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/explorer-browsetype.png -------------------------------------------------------------------------------- /docs/img/explorer-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/explorer-home.png -------------------------------------------------------------------------------- /docs/img/explorer-searchquery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/explorer-searchquery.png -------------------------------------------------------------------------------- /docs/img/explorer-searchresult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/explorer-searchresult.png -------------------------------------------------------------------------------- /docs/img/history-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/history-home.png -------------------------------------------------------------------------------- /docs/img/history-lookup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/history-lookup.png -------------------------------------------------------------------------------- /docs/img/history-objectview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/history-objectview.png -------------------------------------------------------------------------------- /docs/img/history-objectview2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/history-objectview2.png -------------------------------------------------------------------------------- /docs/img/history-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/history-state.png -------------------------------------------------------------------------------- /docs/img/history-statetype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/history-statetype.png -------------------------------------------------------------------------------- /docs/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/logo.png -------------------------------------------------------------------------------- /docs/img/logo_white_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/logo_white_bg.png -------------------------------------------------------------------------------- /docs/img/memlayout-bitstring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/memlayout-bitstring.png -------------------------------------------------------------------------------- /docs/img/memlayout-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/memlayout-list.png -------------------------------------------------------------------------------- /docs/img/memlayout-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/memlayout-map.png -------------------------------------------------------------------------------- /docs/img/memlayout-object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/memlayout-object.png -------------------------------------------------------------------------------- /docs/img/memlayout-set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/docs/img/memlayout-set.png -------------------------------------------------------------------------------- /docs/license.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Netflix, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /gradle/buildViaTravis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script will build the project. 3 | 4 | SWITCHES="--info --stacktrace" 5 | 6 | GRADLE_VERSION=$(./gradlew -version | grep Gradle | cut -d ' ' -f 2) 7 | 8 | if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then 9 | echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" 10 | ./gradlew build $SWITCHES 11 | elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then 12 | echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' 13 | ./gradlew -Prelease.travisci=true snapshot $SWITCHES 14 | elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then 15 | echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' 16 | case "$TRAVIS_TAG" in 17 | *-rc\.*) 18 | ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true candidate $SWITCHES 19 | ;; 20 | *) 21 | ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true final $SWITCHES 22 | ;; 23 | esac 24 | else 25 | echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' 26 | ./gradlew build $SWITCHES 27 | fi 28 | 29 | EXIT=$? 30 | 31 | rm -f "$HOME/.gradle/caches/modules-2/modules-2.lock" 32 | rm -rf "$HOME/.gradle/caches/$GRADLE_VERSION/plugin-resolution" 33 | 34 | exit $EXIT 35 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Sep 27 15:16:03 PDT 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 7 | -------------------------------------------------------------------------------- /hollow-diff-ui/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | apply plugin: 'com.netflix.nebula.facet' 3 | 4 | facets { 5 | tools { 6 | parentSourceSet = 'test' 7 | } 8 | } 9 | 10 | dependencies { 11 | api project(':hollow') 12 | api project(':hollow-ui-tools') 13 | implementation project(':hollow-test') 14 | implementation 'com.google.code.gson:gson:2.10.1' 15 | 16 | implementation "javax.servlet:javax.servlet-api:4.0.1" 17 | 18 | testImplementation 'junit:junit:4.11' 19 | } 20 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diff/ui/DiffUIServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package com.netflix.hollow.diff.ui; 19 | 20 | import com.netflix.hollow.tools.diff.HollowDiff; 21 | import com.netflix.hollow.ui.UIServer; 22 | 23 | public interface DiffUIServer extends UIServer { 24 | HollowDiffUI addDiff(String diffPath, HollowDiff diff, String fromBlobName, String toBlobName); 25 | } 26 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diff/ui/DiffUIWebServer.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.diff.ui; 2 | 3 | import com.netflix.hollow.tools.diff.HollowDiff; 4 | import com.netflix.hollow.ui.HollowUIWebServer; 5 | import com.netflix.hollow.ui.HttpHandlerWithServletSupport; 6 | 7 | class DiffUIWebServer extends HollowUIWebServer implements DiffUIServer { 8 | private final HollowDiffUIRouter router; 9 | 10 | public DiffUIWebServer(HollowDiffUIRouter router, int port) { 11 | super(new HttpHandlerWithServletSupport(router), port); 12 | this.router = router; 13 | } 14 | 15 | public HollowDiffUI addDiff(String diffPath, HollowDiff diff, String fromBlobName, String toBlobName) { 16 | return this.router.addDiff(diffPath, diff, fromBlobName, toBlobName); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diff/ui/model/HollowDiffUIBreadcrumbs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.diff.ui.model; 18 | 19 | 20 | public class HollowDiffUIBreadcrumbs { 21 | 22 | private final String link; 23 | private final String displayText; 24 | 25 | public HollowDiffUIBreadcrumbs(String link, String displayText) { 26 | this.link = link; 27 | this.displayText = displayText; 28 | } 29 | 30 | public String getLink() { 31 | return link; 32 | } 33 | public String getDisplayText() { 34 | return displayText; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diff/ui/model/HollowUnmatchedObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.diff.ui.model; 18 | 19 | public class HollowUnmatchedObject { 20 | 21 | private final String displayKey; 22 | private final int ordinal; 23 | 24 | public HollowUnmatchedObject(String displayKey, int ordinal) { 25 | this.displayKey = displayKey; 26 | this.ordinal = ordinal; 27 | } 28 | 29 | public String getDisplayKey() { 30 | return displayKey; 31 | } 32 | public int getOrdinal() { 33 | return ordinal; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diffview/HollowObjectViewProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.diffview; 18 | 19 | import com.netflix.hollow.ui.HollowUISession; 20 | import javax.servlet.http.HttpServletRequest; 21 | 22 | public interface HollowObjectViewProvider { 23 | 24 | public HollowObjectView getObjectView(HttpServletRequest req, HollowUISession session); 25 | } 26 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diffview/effigy/CustomHollowEffigyFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.diffview.effigy; 18 | 19 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 20 | 21 | public interface CustomHollowEffigyFactory { 22 | 23 | /** 24 | * Set the from record, called before generateEffigies 25 | */ 26 | public void setFromHollowRecord(HollowTypeDataAccess fromState, int ordinal); 27 | 28 | /** 29 | * Set the to record, called before generateEffigies 30 | */ 31 | public void setToHollowRecord(HollowTypeDataAccess toState, int ordinal); 32 | 33 | /** 34 | * Generate the effigies, called before getFromEffigy and getToEffigy 35 | */ 36 | public void generateEffigies(); 37 | 38 | public HollowEffigy getFromEffigy(); 39 | 40 | public HollowEffigy getToEffigy(); 41 | } 42 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diffview/effigy/HollowRecordDiffUI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.diffview.effigy; 18 | 19 | import com.netflix.hollow.core.index.key.PrimaryKey; 20 | import com.netflix.hollow.diffview.effigy.pairer.exact.ExactRecordMatcher; 21 | import java.util.Map; 22 | 23 | 24 | public interface HollowRecordDiffUI { 25 | 26 | public Map getMatchHints(); 27 | 28 | public CustomHollowEffigyFactory getCustomHollowEffigyFactory(String typeName); 29 | 30 | public ExactRecordMatcher getExactRecordMatcher(); 31 | } 32 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diffview/effigy/pairer/HollowEffigyMapPairer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.diffview.effigy.pairer; 18 | 19 | import com.netflix.hollow.core.index.key.PrimaryKey; 20 | import com.netflix.hollow.diffview.effigy.HollowEffigy; 21 | 22 | public class HollowEffigyMapPairer extends HollowEffigyCollectionPairer { 23 | 24 | public HollowEffigyMapPairer(HollowEffigy fromCollection, HollowEffigy toCollection, PrimaryKey matchHint) { 25 | super(fromCollection, toCollection, matchHint); 26 | } 27 | 28 | @Override 29 | protected HollowEffigy getComparisonEffigy(HollowEffigy effigy) { 30 | return (HollowEffigy) effigy.getFields().get(0).getValue(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diffview/effigy/pairer/exact/ExactRecordMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.diffview.effigy.pairer.exact; 18 | 19 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 20 | 21 | public interface ExactRecordMatcher { 22 | 23 | public boolean isExactMatch(HollowTypeDataAccess fromType, int fromOrdinal, HollowTypeDataAccess toType, int toOrdinal); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/diffview/effigy/pairer/exact/HistoryExactRecordMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.diffview.effigy.pairer.exact; 18 | 19 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 20 | 21 | public class HistoryExactRecordMatcher implements ExactRecordMatcher { 22 | 23 | public static HistoryExactRecordMatcher INSTANCE = new HistoryExactRecordMatcher(); 24 | 25 | private HistoryExactRecordMatcher() { } 26 | 27 | @Override 28 | public boolean isExactMatch(HollowTypeDataAccess fromType, int fromOrdinal, HollowTypeDataAccess toType, int toOrdinal) { 29 | return fromType != null && fromType == toType && fromOrdinal == toOrdinal; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/java/com/netflix/hollow/history/ui/model/HistoricalObjectChangeVersion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.history.ui.model; 18 | 19 | public class HistoricalObjectChangeVersion { 20 | 21 | private final long versionId; 22 | private final String dateDisplayString; 23 | 24 | public HistoricalObjectChangeVersion(long versionId, String dateDisplayString) { 25 | this.versionId = versionId; 26 | this.dateDisplayString = dateDisplayString; 27 | } 28 | 29 | public long getVersionId() { 30 | return versionId; 31 | } 32 | 33 | public String getDateDisplayString() { 34 | return dateDisplayString; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/resources/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/hollow-diff-ui/src/main/resources/collapse.png -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/resources/diff-field.vm: -------------------------------------------------------------------------------- 1 | #** 2 | * Copyright 2016 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *# 16 | 17 |

Object Diffs

18 | 19 | #foreach($objectPairScore in $objectScorePairs) 20 | 21 | $objectPairScore.getDisplayKey() ($objectPairScore.getDiffScore()) 22 |
23 | #end 24 | 25 | #if($previousDiffPairPageBeginIdx) 26 | << Previous 27 | #end 28 | #if($nextDiffPairPageBeginIdx) 29 | Next >> 30 | #end 31 | 32 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/resources/diff-footer.vm: -------------------------------------------------------------------------------- 1 | #** 2 | * Copyright 2016 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *# 16 | 17 |


18 | 19 |

Blob Information:

20 | 21 | 22 | 23 | 24 | #foreach($headerEntry in $headerEntries) 25 | 26 | 27 | 28 | 29 | 30 | 31 | #end 32 |
#Header NameFROM_BlobTO_Blob
$headerEntry.getIdx()$headerEntry.getKey()$headerEntry.getFromValue()$headerEntry.getToValue()
33 | 34 | 35 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/resources/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/hollow-diff-ui/src/main/resources/expand.png -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/resources/expandall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/hollow-diff-ui/src/main/resources/expandall.png -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/resources/history-footer.vm: -------------------------------------------------------------------------------- 1 | #** 2 | * Copyright 2016 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *# 16 | 17 | 18 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/main/resources/partial_expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/hollow-diff-ui/src/main/resources/partial_expand.png -------------------------------------------------------------------------------- /hollow-diff-ui/src/test/java/com/netflix/hollow/diffview/HollowDiffUIServerTest.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.diffview; 2 | 3 | import com.netflix.hollow.diff.ui.HollowDiffUIServer; 4 | import com.netflix.hollow.tools.diff.HollowDiff; 5 | import org.junit.Test; 6 | 7 | public class HollowDiffUIServerTest { 8 | 9 | @Test 10 | public void test() throws Exception { 11 | HollowDiff testDiff = new FakeHollowDiffGenerator().createFakeDiff(); 12 | 13 | HollowDiffUIServer server = new HollowDiffUIServer(0); 14 | 15 | server.addDiff("diff", testDiff); 16 | 17 | server.start(); 18 | server.stop(); 19 | } 20 | 21 | @Test 22 | public void testBackwardsCompatibiltyWithJettyImplementation() throws Exception { 23 | HollowDiff testDiff = new FakeHollowDiffGenerator().createFakeDiff(); 24 | 25 | com.netflix.hollow.diff.ui.jetty.HollowDiffUIServer server = new com.netflix.hollow.diff.ui.jetty.HollowDiffUIServer(0); 26 | 27 | server.addDiff("diff", testDiff); 28 | 29 | server.start(); 30 | server.stop(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/test/java/com/netflix/hollow/diffview/HollowHistoryUIServerTest.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.diffview; 2 | 3 | import com.netflix.hollow.core.read.engine.HollowReadStateEngine; 4 | import com.netflix.hollow.history.ui.HollowHistoryUIServer; 5 | import com.netflix.hollow.tools.history.HollowHistory; 6 | import org.junit.Test; 7 | 8 | public class HollowHistoryUIServerTest { 9 | @Test 10 | public void test() throws Exception { 11 | HollowHistory hh = new HollowHistory(new HollowReadStateEngine(), Long.MAX_VALUE, 10); 12 | HollowHistoryUIServer server = new HollowHistoryUIServer(hh, 0); 13 | server.start(); 14 | server.stop(); 15 | } 16 | 17 | @Test 18 | public void testBackwardsCompatibiltyWithJettyImplementation() throws Exception { 19 | HollowHistory hh = new HollowHistory(new HollowReadStateEngine(), Long.MAX_VALUE, 10); 20 | com.netflix.hollow.history.ui.jetty.HollowHistoryUIServer server = new com.netflix.hollow.history.ui.jetty.HollowHistoryUIServer(hh, 0); 21 | 22 | server.start(); 23 | server.stop(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /hollow-diff-ui/src/tools/java/com/netflix/hollow/diff/ui/DiffUITest.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.diff.ui; 2 | 3 | import com.netflix.hollow.diffview.FakeHollowDiffGenerator; 4 | import com.netflix.hollow.tools.diff.HollowDiff; 5 | import org.junit.Test; 6 | 7 | public class DiffUITest { 8 | 9 | @Test 10 | public void test() throws Exception { 11 | HollowDiff testDiff = new FakeHollowDiffGenerator().createFakeDiff(); 12 | 13 | HollowDiffUIServer server = new HollowDiffUIServer(); 14 | 15 | server.addDiff("diff", testDiff); 16 | 17 | server.start(); 18 | server.join(); 19 | } 20 | 21 | @Test 22 | public void testBackwardsCompatibiltyWithJettyImplementation() throws Exception { 23 | HollowDiff testDiff = new FakeHollowDiffGenerator().createFakeDiff(); 24 | 25 | com.netflix.hollow.diff.ui.jetty.HollowDiffUIServer server = new com.netflix.hollow.diff.ui.jetty.HollowDiffUIServer(); 26 | 27 | server.addDiff("diff", testDiff); 28 | 29 | server.start(); 30 | server.join(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /hollow-explorer-ui/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | apply plugin: 'com.netflix.nebula.facet' 3 | 4 | facets { 5 | tools { 6 | parentSourceSet = 'test' 7 | } 8 | } 9 | 10 | dependencies { 11 | api project(':hollow') 12 | api project(':hollow-ui-tools') 13 | 14 | implementation "javax.servlet:javax.servlet-api:4.0.1" 15 | 16 | testImplementation 'junit:junit:4.11' 17 | } 18 | -------------------------------------------------------------------------------- /hollow-explorer-ui/src/main/java/com/netflix/hollow/explorer/ui/model/TypeKey.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.explorer.ui.model; 18 | 19 | public class TypeKey { 20 | 21 | private final int idx; 22 | private final String keyStr; 23 | private final String keyDisplayStr; 24 | private final int ordinal; 25 | 26 | public TypeKey(int idx, int ordinal, String keyStr, String keyDisplayStr) { 27 | this.idx = idx; 28 | this.ordinal = ordinal; 29 | this.keyStr = keyStr; 30 | this.keyDisplayStr = keyDisplayStr; 31 | } 32 | 33 | public int getIdx() { 34 | return idx; 35 | } 36 | 37 | public int getOrdinal() { 38 | return ordinal; 39 | } 40 | 41 | public String getKey() { 42 | return keyStr; 43 | } 44 | 45 | public String getKeyDisplay() { 46 | return keyDisplayStr; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /hollow-explorer-ui/src/main/resources/browse-selected-type-bottom.vm: -------------------------------------------------------------------------------- 1 | #** 2 | * Copyright 2023 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *# 16 | #if($ordinal != $null)#end 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /hollow-explorer-ui/src/main/resources/explorer-footer.vm: -------------------------------------------------------------------------------- 1 | #** 2 | * Copyright 2017 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *# 16 | 17 | -------------------------------------------------------------------------------- /hollow-explorer-ui/src/test/java/com/netflix/hollow/explorer/ui/HollowExplorerUIServerTest.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.explorer.ui; 2 | 3 | import com.netflix.hollow.core.read.engine.HollowReadStateEngine; 4 | import org.junit.Test; 5 | 6 | public class HollowExplorerUIServerTest { 7 | @Test 8 | public void test() throws Exception { 9 | HollowExplorerUIServer server = new HollowExplorerUIServer(new HollowReadStateEngine(), 7890); 10 | 11 | server.start(); 12 | server.stop(); 13 | } 14 | 15 | @Test 16 | public void testBackwardsCompatibiltyWithJettyImplementation() throws Exception { 17 | com.netflix.hollow.explorer.ui.jetty.HollowExplorerUIServer server = new com.netflix.hollow.explorer.ui.jetty.HollowExplorerUIServer(new HollowReadStateEngine(), 7890); 18 | 19 | server.start(); 20 | server.stop(); 21 | } 22 | } -------------------------------------------------------------------------------- /hollow-fakedata/README.md: -------------------------------------------------------------------------------- 1 | The fake data generator can be used to generate a fake Book catalog dataset with tunable parameters for data set size, 2 | desired no. of states in the data set, and entropy in no. of additions/modifications/removal in between states. This fake 3 | dataset helps OSS developers synthesize a dataset of a fairly complex data model, to test functional or performance changes 4 | against. 5 | 6 | Run the `main` method to generate data locally, or simply downloaded pre-generated data from a publicly accessible S3 bucket 7 | by following instructions in the user docs. 8 | 9 | -------------------------------------------------------------------------------- /hollow-fakedata/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | dependencies { 4 | implementation project(':hollow-explorer-ui') 5 | implementation project(':hollow-diff-ui') 6 | 7 | implementation 'com.github.javafaker:javafaker:latest.release' 8 | } 9 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/Art.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | public class Art { 4 | String id; 5 | 6 | Artist artist; 7 | 8 | long timeOfCreation; 9 | long size; 10 | 11 | public Art(String id, Artist artist, long timeOfCreation, long size) { 12 | this.id = id; 13 | this.artist = artist; 14 | this.timeOfCreation = timeOfCreation; 15 | this.size = size; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/Artist.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowPrimaryKey; 4 | 5 | @HollowPrimaryKey(fields = "name") 6 | public class Artist { 7 | String name; 8 | 9 | String city; 10 | 11 | public Artist(String name, String city) { 12 | this.name = name; 13 | this.city = city; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/Book.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowPrimaryKey; 4 | 5 | @HollowPrimaryKey(fields = {"id", "country"}) 6 | public class Book { 7 | public BookId id; 8 | public Country country; 9 | public BookImages images; 10 | public BookMetadata bookMetadata; 11 | 12 | public Book(BookId id, Country country, BookImages images, BookMetadata bookMetadata) { 13 | this.id = id; 14 | this.country = country; 15 | this.images = images; 16 | this.bookMetadata = bookMetadata; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/BookId.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | public class BookId { 4 | public int value; 5 | 6 | public BookId(int value) { 7 | this.value = value; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/BookImages.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public class BookImages { 7 | public Map> art; 8 | 9 | public BookImages(Map> art) { 10 | this.art = art; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/BookMetadata.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | import java.util.List; 4 | 5 | public class BookMetadata { 6 | public String name; 7 | public Genre genre; 8 | public List chapters; 9 | 10 | public BookMetadata(String name, Genre genre, List chapters) { 11 | this.name = name; 12 | this.genre = genre; 13 | this.chapters = chapters; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/Chapter.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowPrimaryKey; 4 | import java.util.List; 5 | 6 | @HollowPrimaryKey(fields = "chapterId") 7 | public class Chapter { 8 | ChapterId chapterId; 9 | ChapterInfo chapterInfo; 10 | List scenes; 11 | 12 | public Chapter(ChapterId chapterId, ChapterInfo chapterInfo, List scenes) { 13 | this.chapterId = chapterId; 14 | this.chapterInfo = chapterInfo; 15 | this.scenes = scenes; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/ChapterId.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | public class ChapterId { 4 | String val; 5 | 6 | public ChapterId(String val) { 7 | this.val = val; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/ChapterInfo.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | public class ChapterInfo { 4 | BookId bookId; 5 | int pages; 6 | byte[] content; 7 | 8 | public ChapterInfo(BookId bookId, int pages, byte[] content) { 9 | this.bookId = bookId; 10 | this.pages = pages; 11 | this.content = content; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/Country.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowInline; 4 | 5 | public class Country { 6 | @HollowInline 7 | String id; 8 | 9 | public Country(String id) { 10 | this.id = id; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/Genre.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | public enum Genre { 4 | ACTION, 5 | CLASSIC, 6 | ART, 7 | TRAVEL, 8 | GUIDE, 9 | PSYCHOLOGY, 10 | BUSINESS, 11 | DRAMA, 12 | POETRY, 13 | ROMANCE, 14 | FICTION 15 | } 16 | -------------------------------------------------------------------------------- /hollow-fakedata/src/main/java/hollow/model/Scene.java: -------------------------------------------------------------------------------- 1 | package hollow.model; 2 | 3 | import java.util.Set; 4 | 5 | public class Scene { 6 | String description; 7 | long popularity; 8 | Set characters; 9 | 10 | public Scene(String description, long popularity, Set characters) { 11 | this.description = description; 12 | this.popularity = popularity; 13 | this.characters = characters; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /hollow-jsonadapter/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | api project(':hollow') 5 | 6 | implementation 'com.fasterxml.jackson.core:jackson-core:2.4.3' 7 | implementation 'com.fasterxml.jackson.core:jackson-databind:2.4.3' 8 | implementation 'commons-io:commons-io:2.6' 9 | implementation 'commons-lang:commons-lang:2.+' 10 | 11 | testImplementation 'junit:junit:4.11' 12 | } 13 | -------------------------------------------------------------------------------- /hollow-jsonadapter/src/main/java/com/netflix/hollow/jsonadapter/discover/DiscoveredSchemaType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.jsonadapter.discover; 18 | 19 | 20 | public enum DiscoveredSchemaType { 21 | OBJECT, 22 | LIST, 23 | MAP 24 | } 25 | -------------------------------------------------------------------------------- /hollow-jsonadapter/src/main/java/com/netflix/hollow/jsonadapter/discover/HollowDiscoveredField.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.jsonadapter.discover; 18 | 19 | import com.netflix.hollow.core.schema.HollowObjectSchema.FieldType; 20 | 21 | public class HollowDiscoveredField { 22 | FieldType fieldType; 23 | String referencedType; 24 | 25 | public HollowDiscoveredField(FieldType fieldType, String referencedType) { 26 | this.fieldType = fieldType; 27 | this.referencedType = referencedType; 28 | } 29 | 30 | @Override 31 | public String toString() { 32 | StringBuilder builder = new StringBuilder(); 33 | builder.append("HollowDiscoveredField [fieldType=").append(fieldType).append(", referencedType=").append(referencedType).append("]"); 34 | return builder.toString(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /hollow-jsonadapter/src/main/java/com/netflix/hollow/jsonadapter/field/FieldProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.jsonadapter.field; 18 | 19 | import com.fasterxml.jackson.core.JsonParser; 20 | import com.netflix.hollow.core.write.HollowObjectWriteRecord; 21 | import com.netflix.hollow.core.write.HollowWriteStateEngine; 22 | import java.io.IOException; 23 | 24 | public interface FieldProcessor { 25 | 26 | public String getEntityName(); 27 | 28 | public String getFieldName(); 29 | 30 | public void processField(JsonParser parser, HollowWriteStateEngine writeEngine, HollowObjectWriteRecord writeRec) throws IOException; 31 | } -------------------------------------------------------------------------------- /hollow-perf/README.md: -------------------------------------------------------------------------------- 1 | Run the `jmhJar` task to produce an uber-jar in the `build/libs` directory. 2 | 3 | Then do 4 | 5 | - `java -jar hollow-perf/build/libs/hollow-perf-*-jmh.jar -h` to print the help information 6 | - `java -jar hollow-perf/build/libs/hollow-perf-*-jmh.jar -l` to list the benchmarks 7 | 8 | An alternative execution is to run the `jmh` task but that will run Gradle in addition to the benchmark which might 9 | introduce more variance in the results. 10 | 11 | If the annotations declared on benchmark classes are modified it may be necessary to kill Gradle daemons and 12 | rebuild. 13 | -------------------------------------------------------------------------------- /hollow-perf/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "me.champeau.jmh" version "0.7.2" 3 | } 4 | 5 | apply plugin: 'java' 6 | 7 | dependencies { 8 | implementation project(':hollow') 9 | 10 | implementation 'org.openjdk.jmh:jmh-core:1.21' 11 | compileOnly 'org.openjdk.jmh:jmh-generator-annprocess:1.21' 12 | } 13 | 14 | tasks.withType(JavaCompile).configureEach { 15 | options.compilerArgs << '-XDignore.symbol.file' 16 | } 17 | 18 | jmh { 19 | duplicateClassesStrategy = DuplicatesStrategy.WARN 20 | } 21 | -------------------------------------------------------------------------------- /hollow-test/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | implementation project(':hollow') 5 | 6 | testImplementation 'junit:junit:4.11' 7 | } 8 | -------------------------------------------------------------------------------- /hollow-test/dependencies.lock: -------------------------------------------------------------------------------- 1 | { 2 | "compileClasspath": { 3 | "com.netflix.hollow:hollow": { 4 | "project": true 5 | } 6 | }, 7 | "runtimeClasspath": { 8 | "com.netflix.hollow:hollow": { 9 | "project": true 10 | } 11 | }, 12 | "testCompileClasspath": { 13 | "com.netflix.hollow:hollow": { 14 | "project": true 15 | }, 16 | "junit:junit": { 17 | "locked": "4.11" 18 | } 19 | }, 20 | "testRuntimeClasspath": { 21 | "com.netflix.hollow:hollow": { 22 | "project": true 23 | }, 24 | "junit:junit": { 25 | "locked": "4.11" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /hollow-test/src/main/java/com/netflix/hollow/test/consumer/TestAnnouncementWatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.test.consumer; 18 | 19 | import com.netflix.hollow.api.consumer.HollowConsumer; 20 | import com.netflix.hollow.api.consumer.HollowConsumer.AnnouncementWatcher; 21 | 22 | /** 23 | * A simple implementation of an AnnouncementWatcher which allows setting the latest version. 24 | */ 25 | public class TestAnnouncementWatcher implements AnnouncementWatcher { 26 | private long latestVersion = NO_ANNOUNCEMENT_AVAILABLE; 27 | 28 | @Override 29 | public long getLatestVersion() { 30 | return latestVersion; 31 | } 32 | 33 | public TestAnnouncementWatcher setLatestVersion(long latestVersion) { 34 | this.latestVersion = latestVersion; 35 | return this; 36 | } 37 | 38 | @Override 39 | public void subscribeToUpdates(HollowConsumer consumer) { 40 | // no-op 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /hollow-test/src/main/java/com/netflix/hollow/test/model/TestTypeA.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.test.model; 18 | 19 | public class TestTypeA { 20 | int id; 21 | String name; 22 | 23 | public TestTypeA(int id, String name) { 24 | this.id = id; 25 | this.name = name; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hollow-ui-tools/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | apply plugin: 'com.netflix.nebula.facet' 3 | 4 | facets { 5 | tools { 6 | parentSourceSet = 'test' 7 | } 8 | } 9 | 10 | dependencies { 11 | api project(':hollow') 12 | 13 | api 'org.apache.velocity:velocity-engine-core:2.3' 14 | implementation 'org.apache.commons:commons-text:1.10.0' 15 | 16 | implementation 'commons-io:commons-io:2.11.0' 17 | implementation 'com.google.code.gson:gson:2.10.1' 18 | 19 | implementation "javax.servlet:javax.servlet-api:4.0.1" 20 | 21 | testImplementation 'junit:junit:4.11' 22 | } 23 | -------------------------------------------------------------------------------- /hollow-ui-tools/src/main/java/com/netflix/hollow/ui/EscapingTool.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package com.netflix.hollow.ui; 19 | 20 | import java.io.UnsupportedEncodingException; 21 | import java.net.URLEncoder; 22 | import java.nio.charset.StandardCharsets; 23 | import org.apache.commons.text.StringEscapeUtils; 24 | 25 | 26 | public class EscapingTool { 27 | 28 | public String html(Object string) { 29 | return string == null ? null : StringEscapeUtils.escapeHtml4(String.valueOf(string)); 30 | } 31 | 32 | public String url(Object string) { 33 | if (string == null) { 34 | return null; 35 | } else { 36 | try { 37 | return URLEncoder.encode(String.valueOf(string), StandardCharsets.UTF_8.name()); 38 | } catch (UnsupportedEncodingException ex) { 39 | return null; 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /hollow-ui-tools/src/main/java/com/netflix/hollow/ui/HollowDiffUtil.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.ui; 2 | 3 | import java.text.DecimalFormat; 4 | 5 | public class HollowDiffUtil { 6 | private static final String[] HEAP_SIZE_UNITS = new String[] { "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"}; 7 | 8 | public static String formatBytes(long sizeInBytes) { 9 | if (sizeInBytes==0) return "0 B"; 10 | 11 | String sign = (sizeInBytes < 0) ? "-" : ""; 12 | sizeInBytes = Math.abs(sizeInBytes); 13 | 14 | int digitGroups = (int) (Math.log10(sizeInBytes)/Math.log10(1024)); 15 | DecimalFormat formatter = new DecimalFormat("#,##0.##"); 16 | return sign + formatter.format(sizeInBytes / Math.pow(1024, digitGroups)) + " " + HEAP_SIZE_UNITS[digitGroups]; 17 | } 18 | } -------------------------------------------------------------------------------- /hollow-ui-tools/src/main/java/com/netflix/hollow/ui/HtmlEscapingWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.ui; 18 | 19 | import java.io.IOException; 20 | import java.io.Writer; 21 | import org.apache.commons.text.StringEscapeUtils; 22 | 23 | public class HtmlEscapingWriter extends Writer { 24 | 25 | private final Writer wrappedWriter; 26 | 27 | public HtmlEscapingWriter(Writer writer) { 28 | this.wrappedWriter = writer; 29 | } 30 | 31 | @Override 32 | public void write(char[] cbuf, int off, int len) throws IOException { 33 | wrappedWriter.write(StringEscapeUtils.escapeHtml4(new String(cbuf, off, len))); 34 | } 35 | 36 | @Override 37 | public void flush() throws IOException { 38 | wrappedWriter.flush(); 39 | } 40 | 41 | @Override 42 | public void close() throws IOException { 43 | wrappedWriter.close(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /hollow-ui-tools/src/main/java/com/netflix/hollow/ui/UIServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package com.netflix.hollow.ui; 19 | 20 | 21 | public interface UIServer { 22 | void start() throws Exception; 23 | void stop() throws Exception; 24 | void join() throws InterruptedException; 25 | } 26 | -------------------------------------------------------------------------------- /hollow-zenoadapter/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | api project(':hollow') 5 | 6 | implementation 'com.netflix.zeno:netflix-zeno:2.22.3' 7 | 8 | testImplementation 'junit:junit:4.11' 9 | } 10 | -------------------------------------------------------------------------------- /hollow-zenoadapter/dependencies.lock: -------------------------------------------------------------------------------- 1 | { 2 | "compileClasspath": { 3 | "com.netflix.hollow:hollow": { 4 | "project": true 5 | }, 6 | "com.netflix.zeno:netflix-zeno": { 7 | "locked": "2.22.3" 8 | } 9 | }, 10 | "runtimeClasspath": { 11 | "com.netflix.hollow:hollow": { 12 | "project": true 13 | }, 14 | "com.netflix.zeno:netflix-zeno": { 15 | "locked": "2.22.3" 16 | } 17 | }, 18 | "testCompileClasspath": { 19 | "com.netflix.hollow:hollow": { 20 | "project": true 21 | }, 22 | "com.netflix.zeno:netflix-zeno": { 23 | "locked": "2.22.3" 24 | }, 25 | "junit:junit": { 26 | "locked": "4.11" 27 | } 28 | }, 29 | "testRuntimeClasspath": { 30 | "com.netflix.hollow:hollow": { 31 | "project": true 32 | }, 33 | "com.netflix.zeno:netflix-zeno": { 34 | "locked": "2.22.3" 35 | }, 36 | "junit:junit": { 37 | "locked": "4.11" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /hollow-zenoadapter/src/main/java/com/netflix/hollow/zenoadapter/HollowSerializationRecord.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.zenoadapter; 18 | 19 | import com.netflix.hollow.core.write.HollowWriteRecord; 20 | import com.netflix.zeno.serializer.NFSerializationRecord; 21 | 22 | public class HollowSerializationRecord extends NFSerializationRecord { 23 | 24 | private final String typeName; 25 | private final HollowWriteRecord hollowWriteRecord; 26 | 27 | public HollowSerializationRecord(HollowWriteRecord rec, String typeName) { 28 | this.hollowWriteRecord = rec; 29 | this.typeName = typeName; 30 | } 31 | 32 | public String getTypeName() { 33 | return typeName; 34 | } 35 | 36 | public HollowWriteRecord getHollowWriteRecord() { 37 | return hollowWriteRecord; 38 | } 39 | 40 | public void reset() { 41 | hollowWriteRecord.reset(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /hollow-zenoadapter/src/test/java/com/netflix/hollow/zenoadapter/util/ObjectIdentityOrdinalMapTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.zenoadapter.util; 18 | 19 | import org.junit.Assert; 20 | import org.junit.Test; 21 | 22 | public class ObjectIdentityOrdinalMapTest { 23 | 24 | Object obj[] = new Object[10000]; 25 | 26 | @Test 27 | public void test() { 28 | for(int i=0;i eventListeners; 9 | 10 | public ListenerSupport() { 11 | eventListeners = new CopyOnWriteArrayList<>(); 12 | } 13 | 14 | public ListenerSupport(List listeners) { 15 | eventListeners = new CopyOnWriteArrayList<>(listeners); 16 | } 17 | 18 | public ListenerSupport(ListenerSupport that) { 19 | eventListeners = new CopyOnWriteArrayList<>(that.eventListeners); 20 | } 21 | 22 | public void addListener(EventListener listener) { 23 | eventListeners.addIfAbsent(listener); 24 | } 25 | 26 | public void removeListener(EventListener listener) { 27 | eventListeners.remove(listener); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/common/Listeners.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.api.common; 2 | 3 | import com.netflix.hollow.api.producer.listener.VetoableListener; 4 | import java.util.Arrays; 5 | import java.util.function.Consumer; 6 | import java.util.logging.Level; 7 | import java.util.logging.Logger; 8 | import java.util.stream.Stream; 9 | 10 | public abstract class Listeners { 11 | 12 | private static final Logger LOG = Logger.getLogger(Listeners.class.getName()); 13 | 14 | protected final EventListener[] listeners; 15 | 16 | protected Listeners(EventListener[] listeners) { 17 | this.listeners = listeners; 18 | } 19 | 20 | public Stream getListeners(Class c) { 21 | return Arrays.stream(listeners).filter(c::isInstance).map(c::cast); 22 | } 23 | 24 | protected void fire( 25 | Class c, Consumer r) { 26 | fireStream(getListeners(c), r); 27 | } 28 | 29 | protected void fireStream( 30 | Stream s, Consumer r) { 31 | s.forEach(l -> { 32 | try { 33 | r.accept(l); 34 | } catch (VetoableListener.ListenerVetoException e) { 35 | throw e; 36 | } catch (RuntimeException e) { 37 | if (l instanceof VetoableListener) { 38 | throw e; 39 | } 40 | LOG.log(Level.WARNING, "Error executing listener", e); 41 | } 42 | }); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/consumer/index/FieldPath.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.consumer.index; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * A field path associated with a field or method declaration whose type or 26 | * return type respectively is associated resolution of the field path. 27 | * 28 | * @see com.netflix.hollow.core.index.FieldPaths 29 | */ 30 | @Retention(RetentionPolicy.RUNTIME) 31 | @Target( {ElementType.FIELD, ElementType.METHOD}) public @interface FieldPath { 32 | /** 33 | * @return the field path, if empty then the path is derived from the field or method name. 34 | */ 35 | String value() default ""; 36 | 37 | /** 38 | * @return the field path order 39 | */ 40 | int order() default 0; 41 | } 42 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/consumer/index/HollowUniqueKeyIndex.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.netflix.hollow.api.consumer.index; 17 | 18 | public interface HollowUniqueKeyIndex { 19 | T findMatch(Object... keys); 20 | } 21 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/consumer/metrics/UpdatePlanDetails.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.consumer.metrics; 18 | 19 | import com.netflix.hollow.api.consumer.HollowConsumer.Blob.BlobType; 20 | import java.util.List; 21 | 22 | /** 23 | * A class that contains details of the consumer refresh update plan that may be useful to report as metrics or logs. 24 | * These details are computed in {@code AbstractRefreshMetricsListener} during execution of the update plan. 25 | */ 26 | public class UpdatePlanDetails { 27 | 28 | long beforeVersion; 29 | long desiredVersion; 30 | List transitionSequence; 31 | int numSuccessfulTransitions; 32 | } 33 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/error/HollowException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.error; 18 | 19 | /** 20 | * A generic exception thrown by hollow. In most cases, a subclass of this exception is thrown. 21 | */ 22 | public class HollowException extends RuntimeException { 23 | public HollowException(String message) { 24 | super(message); 25 | } 26 | 27 | public HollowException(String message, Throwable cause) { 28 | super(message, cause); 29 | } 30 | 31 | public HollowException(Throwable cause) { 32 | super(cause); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/error/HollowWriteStateException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.error; 18 | 19 | /** 20 | * An exception thrown when the write state is unable to advance, revert, or otherwise fails. 21 | */ 22 | public class HollowWriteStateException extends HollowException { 23 | public HollowWriteStateException(String message) { 24 | super(message); 25 | } 26 | 27 | public HollowWriteStateException(String message, Throwable cause) { 28 | super(message, cause); 29 | } 30 | 31 | public HollowWriteStateException(Throwable cause) { 32 | super(cause); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/metrics/HollowMetricsCollector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.metrics; 18 | 19 | public abstract class HollowMetricsCollector { 20 | 21 | private T metrics; 22 | 23 | public T getMetrics() { 24 | return metrics; 25 | } 26 | 27 | public void setMetrics(T metrics) { 28 | this.metrics = metrics; 29 | } 30 | 31 | public abstract void collect(T metrics); 32 | } 33 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/objects/HollowRecord.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.objects; 18 | 19 | import com.netflix.hollow.api.objects.delegate.HollowRecordDelegate; 20 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 21 | import com.netflix.hollow.core.schema.HollowSchema; 22 | 23 | /** 24 | * A HollowRecord is the base interface for accessing data from any kind of record 25 | * in a Hollow dataset. 26 | */ 27 | public interface HollowRecord { 28 | 29 | public int getOrdinal(); 30 | 31 | public HollowSchema getSchema(); 32 | 33 | public HollowTypeDataAccess getTypeDataAccess(); 34 | 35 | public HollowRecordDelegate getDelegate(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/objects/delegate/HollowCachedDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.objects.delegate; 18 | 19 | import com.netflix.hollow.api.custom.HollowTypeAPI; 20 | import com.netflix.hollow.api.objects.provider.HollowObjectCacheProvider; 21 | 22 | /** 23 | * This is the extension of the {@link HollowRecordDelegate} interface for cached delegates. 24 | * 25 | * @see HollowRecordDelegate 26 | */ 27 | public interface HollowCachedDelegate extends HollowRecordDelegate { 28 | 29 | /** 30 | * Called by the {@link HollowObjectCacheProvider} when the api is updated. 31 | * @param typeAPI the type api that is updated 32 | */ 33 | void updateTypeAPI(HollowTypeAPI typeAPI); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/objects/provider/HollowFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.objects.provider; 18 | 19 | import com.netflix.hollow.api.custom.HollowTypeAPI; 20 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 21 | 22 | /** 23 | * A HollowFactory is responsible for returning objects in a generated Hollow Object API. The HollowFactory for individual 24 | * types can be overridden to return hand-coded implementations of specific record types. 25 | */ 26 | public abstract class HollowFactory { 27 | 28 | public abstract T newHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal); 29 | 30 | public T newCachedHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 31 | return newHollowObject(dataAccess, typeAPI, ordinal); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/objects/provider/HollowObjectProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.objects.provider; 18 | 19 | /** 20 | * A HollowObjectProvider, either one of {@link HollowObjectFactoryProvider} or {@link HollowObjectCacheProvider}, 21 | * depending on whether the specific type is "cached". 22 | */ 23 | public abstract class HollowObjectProvider { 24 | 25 | public abstract T getHollowObject(int ordinal); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/perfapi/HashKeyExtractor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.perfapi; 18 | 19 | @FunctionalInterface 20 | public interface HashKeyExtractor { 21 | 22 | public Object extract(Object extractFrom); 23 | 24 | public default Object[] extractArray(Object extractFrom) { 25 | Object obj = extract(extractFrom); 26 | if(obj.getClass().isArray()) { 27 | return (Object[])obj; 28 | } 29 | return new Object[] { obj }; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/perfapi/HollowRef.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.perfapi; 18 | 19 | public abstract class HollowRef { 20 | protected final long ref; 21 | 22 | protected HollowRef(long ref) { 23 | this.ref = ref; 24 | } 25 | 26 | public long ref() { 27 | return ref; 28 | } 29 | 30 | @Override 31 | public boolean equals(Object o) { 32 | if (this == o) { 33 | return true; 34 | } 35 | if (!(o instanceof HollowRef)) { 36 | return false; 37 | } 38 | 39 | HollowRef hollowRef = (HollowRef) o; 40 | return ref == hollowRef.ref; 41 | } 42 | 43 | @Override 44 | public int hashCode() { 45 | return Long.hashCode(ref); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/perfapi/POJOInstantiator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.perfapi; 18 | 19 | @FunctionalInterface 20 | public interface POJOInstantiator { 21 | 22 | T instantiate(long ref); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/producer/AbstractIncrementalCycleListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.producer; 18 | 19 | import java.util.concurrent.TimeUnit; 20 | 21 | /** 22 | * Beta API subject to change. 23 | * @deprecated see {@link com.netflix.hollow.api.producer.listener.IncrementalPopulateListener} 24 | * @see com.netflix.hollow.api.producer.listener.IncrementalPopulateListener 25 | */ 26 | @Deprecated 27 | public class AbstractIncrementalCycleListener implements IncrementalCycleListener { 28 | @Override 29 | public void onCycleComplete(IncrementalCycleStatus status, long elapsed, TimeUnit unit) { } 30 | 31 | @Override 32 | public void onCycleFail(IncrementalCycleStatus status, long elapsed, TimeUnit unit) { } 33 | } 34 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/producer/enforcer/BasicSingleProducerEnforcer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.producer.enforcer; 18 | 19 | public class BasicSingleProducerEnforcer extends AbstractSingleProducerEnforcer { 20 | private boolean isPrimary = true; 21 | 22 | @Override 23 | protected void _enable() { 24 | isPrimary = true; 25 | } 26 | 27 | @Override 28 | protected void _disable() { 29 | isPrimary = false; 30 | } 31 | 32 | @Override 33 | protected boolean _isPrimary() { 34 | return isPrimary; 35 | } 36 | 37 | @Override 38 | protected void _force() { 39 | isPrimary = true; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/producer/listener/HollowProducerEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.producer.listener; 18 | 19 | import com.netflix.hollow.api.common.EventListener; 20 | 21 | /** 22 | * The top-level type for all producer-specific listeners. 23 | */ 24 | public interface HollowProducerEventListener extends EventListener { 25 | } 26 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/producer/metrics/ProducerMetricsReporting.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.producer.metrics; 18 | 19 | /** 20 | * Allows implementations to plug in custom reporting of producer metrics, while not enforcing that any or all metrics 21 | * are reported. For example, an implementation might only be insterested in cycle metrics but not announcement metrics, etc. 22 | */ 23 | public interface ProducerMetricsReporting { 24 | 25 | default void cycleMetricsReporting(CycleMetrics cycleMetrics) { 26 | // no-op 27 | } 28 | 29 | default void announcementMetricsReporting(AnnouncementMetrics announcementMetrics) { 30 | // no-op 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/producer/validation/ValidationResultType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.producer.validation; 18 | 19 | /** 20 | * The type of validation result. 21 | */ 22 | public enum ValidationResultType { 23 | /** 24 | * The validation passed. 25 | */ 26 | // @@@ Skipping might be considered a sub-state of PASSED with details in ValidationResult 27 | PASSED, 28 | /** 29 | * The validation failed. 30 | */ 31 | FAILED, 32 | /** 33 | * The validator failed with an unexpected error and could not perform the validation 34 | */ 35 | ERROR 36 | } 37 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/sampling/DisabledSamplingDirector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.sampling; 18 | 19 | public class DisabledSamplingDirector extends HollowSamplingDirector { 20 | 21 | public static final DisabledSamplingDirector INSTANCE = new DisabledSamplingDirector(); 22 | 23 | private DisabledSamplingDirector() { } 24 | 25 | @Override 26 | public boolean shouldRecord() { 27 | return false; 28 | } 29 | 30 | @Override 31 | public void setUpdateThread(Thread t) { } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/sampling/EnabledSamplingDirector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.sampling; 18 | 19 | public class EnabledSamplingDirector extends HollowSamplingDirector { 20 | 21 | public EnabledSamplingDirector() { } 22 | 23 | @Override 24 | public boolean shouldRecord() { 25 | return !isUpdateThread(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/sampling/HollowSampler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.sampling; 18 | 19 | import com.netflix.hollow.core.read.filter.HollowFilterConfig; 20 | import java.util.Collection; 21 | 22 | public interface HollowSampler { 23 | 24 | public void setSamplingDirector(HollowSamplingDirector director); 25 | 26 | public void setFieldSpecificSamplingDirector(HollowFilterConfig fieldSpec, HollowSamplingDirector director); 27 | 28 | public void setUpdateThread(Thread t); 29 | 30 | public boolean hasSampleResults(); 31 | 32 | public Collection getSampleResults(); 33 | 34 | public void reset(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/sampling/HollowSamplingDirector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.sampling; 18 | 19 | public abstract class HollowSamplingDirector { 20 | 21 | private Thread updateThread; 22 | 23 | public abstract boolean shouldRecord(); 24 | 25 | public void setUpdateThread(Thread t) { 26 | this.updateThread = t; 27 | } 28 | 29 | protected boolean isUpdateThread() { 30 | return updateThread != null && updateThread == Thread.currentThread(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/sampling/SamplingStatusListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.sampling; 18 | 19 | public interface SamplingStatusListener { 20 | 21 | public void samplingStatusChanged(boolean samplingOn); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/api/testdata/HollowTestDataMapEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.testdata; 18 | 19 | @SuppressWarnings("rawtypes") 20 | public class HollowTestDataMapEntry { 21 | 22 | private final K key; 23 | private final V value; 24 | 25 | public HollowTestDataMapEntry(K key, V value) { 26 | this.key = key; 27 | this.value = value; 28 | } 29 | 30 | public K key() { 31 | return key; 32 | } 33 | 34 | public V value() { 35 | return value; 36 | } 37 | 38 | public static HollowTestDataMapEntry entry(K key, V value) { 39 | return new HollowTestDataMapEntry<>(key, value); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/HollowConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core; 18 | 19 | /** 20 | * An interface to gather various sentinel constants used across hollow. 21 | */ 22 | public interface HollowConstants { 23 | /** 24 | * A version of VERSION_LATEST signifies "latest version". 25 | */ 26 | long VERSION_LATEST = Long.MAX_VALUE; 27 | 28 | /** 29 | * A version of VERSION_NONE signifies "no version". 30 | */ 31 | long VERSION_NONE = Long.MIN_VALUE; 32 | 33 | /** 34 | * An ordinal of NULL_ORDINAL signifies "null reference" or "no ordinal" 35 | */ 36 | int ORDINAL_NONE = -1; 37 | 38 | /** 39 | * The maximum number of buckets allowed in a Hollow hash table. Empty space is reserved (based on 70% load factor), 40 | * otherwise performance approaches O(n). 41 | */ 42 | int HASH_TABLE_MAX_SIZE = (int)((1L << 30) * 7 / 10); 43 | } 44 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/index/TestableUniqueKeyIndex.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.index; 2 | 3 | import java.util.Collection; 4 | 5 | /** 6 | * This package is for internal use. Do not depend on it. 7 | * 8 | * This interface allows us to re-use tests for two very similar classes. If we 9 | * merge {@link HollowPrimaryKeyIndex} and {@link HollowUniqueKeyIndex}, then this 10 | * interface won't be necessary. 11 | */ 12 | @SuppressWarnings({"DeprecatedIsStillUsed", "override"}) 13 | @Deprecated 14 | interface TestableUniqueKeyIndex { 15 | void listenForDeltaUpdates(); 16 | 17 | int getMatchingOrdinal(Object key); 18 | int getMatchingOrdinal(Object key1, Object key2); 19 | int getMatchingOrdinal(Object key1, Object key2, Object key3); 20 | 21 | Object[] getRecordKey(int ordinal); 22 | 23 | boolean containsDuplicates(); 24 | 25 | Collection getDuplicateKeys(); 26 | } 27 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/memory/ArrayByteData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.memory; 18 | 19 | /** 20 | * A ByteData backed by a simple array of bytes. 21 | * 22 | * @author dkoszewnik 23 | * 24 | */ 25 | public class ArrayByteData implements ByteData { 26 | 27 | private final byte[] data; 28 | 29 | public ArrayByteData(byte[] data) { 30 | this.data = data; 31 | } 32 | 33 | @Override 34 | public byte get(long position) { 35 | return data[(int)position]; 36 | } 37 | 38 | @Override 39 | public long length() { 40 | return data.length; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/memory/MemoryMode.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.memory; 2 | 3 | public enum MemoryMode { 4 | 5 | ON_HEAP, // eager load into main memory, on JVM heap 6 | SHARED_MEMORY_LAZY; // map to virtual memory and lazy load into main memory, off heap 7 | // SHARED_MEMORY_EAGER // (in future) map to virtual memory and eager load into main memory, off heap 8 | 9 | /* 10 | * Returns whether a memory mode is supported by Hollow consumer 11 | */ 12 | public boolean consumerSupported() { 13 | return this.equals(ON_HEAP) || this.equals(SHARED_MEMORY_LAZY); 14 | } 15 | 16 | /* 17 | * Returns whether a memory mode supports type filtering 18 | */ 19 | public boolean supportsFiltering() { 20 | return this.equals(ON_HEAP); 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/memory/VariableLengthDataFactory.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.memory; 2 | 3 | import com.netflix.hollow.core.memory.pool.ArraySegmentRecycler; 4 | import java.util.logging.Logger; 5 | 6 | public class VariableLengthDataFactory { 7 | 8 | private static final Logger LOG = Logger.getLogger(VariableLengthDataFactory.class.getName()); 9 | 10 | public static VariableLengthData get(MemoryMode memoryMode, ArraySegmentRecycler memoryRecycler) { 11 | 12 | if (memoryMode.equals(MemoryMode.ON_HEAP)) { 13 | return new SegmentedByteArray(memoryRecycler); 14 | 15 | } else if (memoryMode.equals(MemoryMode.SHARED_MEMORY_LAZY)) { 16 | /// list pointer array 17 | return new EncodedByteBuffer(); 18 | } else { 19 | throw new UnsupportedOperationException("Memory mode " + memoryMode.name() + " not supported"); 20 | } 21 | } 22 | 23 | public static void destroy(VariableLengthData vld) { 24 | if (vld instanceof SegmentedByteArray) { 25 | ((SegmentedByteArray) vld).destroy(); 26 | } else if (vld instanceof EncodedByteBuffer) { 27 | LOG.warning("Destroy operation is a no-op in shared memory mode"); 28 | } else { 29 | throw new UnsupportedOperationException("Unknown type"); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/memory/encoding/ZigZag.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.memory.encoding; 18 | 19 | import com.netflix.hollow.core.schema.HollowObjectSchema.FieldType; 20 | 21 | /** 22 | * Zig-zag encoding. Used to encode {@link FieldType#INT} and {@link FieldType#LONG} because smaller absolute 23 | * values can be encoded using fewer bits. 24 | */ 25 | public class ZigZag { 26 | 27 | public static long encodeLong(long l) { 28 | return (l << 1) ^ (l >> 63); 29 | } 30 | 31 | public static long decodeLong(long l) { 32 | return (l >>> 1) ^ ((l << 63) >> 63); 33 | } 34 | 35 | public static int encodeInt(int i) { 36 | return (i << 1) ^ (i >> 31); 37 | } 38 | 39 | public static int decodeInt(int i) { 40 | return (i >>> 1) ^ ((i << 31) >> 31); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/dataaccess/HollowListTypeDataAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.read.dataaccess; 18 | 19 | import com.netflix.hollow.core.read.engine.list.HollowListTypeReadState; 20 | import com.netflix.hollow.core.schema.HollowListSchema; 21 | 22 | /** 23 | * A handle for all of the records of a specific LIST type in a Hollow dataset. The most common type of {@link HollowListTypeDataAccess} 24 | * is a {@link HollowListTypeReadState}. 25 | * 26 | * @see HollowListSchema 27 | */ 28 | public interface HollowListTypeDataAccess extends HollowCollectionTypeDataAccess { 29 | 30 | HollowListSchema getSchema(); 31 | 32 | /** 33 | * @param ordinal the oridinal 34 | * @param listIndex the list index 35 | * @return the element at the specified listIndex from the list record at the specified ordinal 36 | */ 37 | int getElementOrdinal(int ordinal, int listIndex); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/engine/HollowTypeDataElements.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.read.engine; 2 | 3 | import com.netflix.hollow.core.memory.MemoryMode; 4 | import com.netflix.hollow.core.memory.encoding.GapEncodedVariableLengthIntegerReader; 5 | import com.netflix.hollow.core.memory.pool.ArraySegmentRecycler; 6 | 7 | public abstract class HollowTypeDataElements { 8 | 9 | public int maxOrdinal; 10 | 11 | public GapEncodedVariableLengthIntegerReader encodedAdditions; 12 | public GapEncodedVariableLengthIntegerReader encodedRemovals; 13 | 14 | public final ArraySegmentRecycler memoryRecycler; 15 | public final MemoryMode memoryMode; 16 | 17 | public HollowTypeDataElements(MemoryMode memoryMode, ArraySegmentRecycler memoryRecycler) { 18 | this.memoryMode = memoryMode; 19 | this.memoryRecycler = memoryRecycler; 20 | } 21 | 22 | public abstract void destroy(); 23 | } 24 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/engine/HollowTypeReadStateShard.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.read.engine; 2 | 3 | public interface HollowTypeReadStateShard { 4 | 5 | HollowTypeDataElements getDataElements(); 6 | 7 | int getShardOrdinalShift(); 8 | } 9 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/engine/ShardsHolder.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.read.engine; 2 | 3 | public interface ShardsHolder { 4 | 5 | HollowTypeReadStateShard[] getShards(); 6 | } 7 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/engine/list/HollowListTypeReshardingStrategy.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.read.engine.list; 2 | 3 | import com.netflix.hollow.core.read.engine.HollowTypeDataElements; 4 | import com.netflix.hollow.core.read.engine.HollowTypeDataElementsJoiner; 5 | import com.netflix.hollow.core.read.engine.HollowTypeDataElementsSplitter; 6 | import com.netflix.hollow.core.read.engine.HollowTypeReshardingStrategy; 7 | 8 | public class HollowListTypeReshardingStrategy extends HollowTypeReshardingStrategy { 9 | @Override 10 | public HollowTypeDataElementsSplitter createDataElementsSplitter(HollowTypeDataElements from, int shardingFactor) { 11 | return new HollowListTypeDataElementsSplitter((HollowListTypeDataElements) from, shardingFactor); 12 | } 13 | 14 | @Override 15 | public HollowTypeDataElementsJoiner createDataElementsJoiner(HollowTypeDataElements[] from) { 16 | return new HollowListTypeDataElementsJoiner((HollowListTypeDataElements[]) from); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/engine/map/HollowMapTypeReshardingStrategy.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.read.engine.map; 2 | 3 | import com.netflix.hollow.core.read.engine.HollowTypeDataElements; 4 | import com.netflix.hollow.core.read.engine.HollowTypeDataElementsJoiner; 5 | import com.netflix.hollow.core.read.engine.HollowTypeDataElementsSplitter; 6 | import com.netflix.hollow.core.read.engine.HollowTypeReshardingStrategy; 7 | 8 | public class HollowMapTypeReshardingStrategy extends HollowTypeReshardingStrategy { 9 | @Override 10 | public HollowTypeDataElementsSplitter createDataElementsSplitter(HollowTypeDataElements from, int shardingFactor) { 11 | return new HollowMapTypeDataElementsSplitter((HollowMapTypeDataElements) from, shardingFactor); 12 | } 13 | 14 | @Override 15 | public HollowTypeDataElementsJoiner createDataElementsJoiner(HollowTypeDataElements[] from) { 16 | return new HollowMapTypeDataElementsJoiner((HollowMapTypeDataElements[]) from); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/engine/object/HollowObjectTypeReshardingStrategy.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.read.engine.object; 2 | 3 | import com.netflix.hollow.core.read.engine.HollowTypeDataElements; 4 | import com.netflix.hollow.core.read.engine.HollowTypeDataElementsJoiner; 5 | import com.netflix.hollow.core.read.engine.HollowTypeDataElementsSplitter; 6 | import com.netflix.hollow.core.read.engine.HollowTypeReshardingStrategy; 7 | 8 | public class HollowObjectTypeReshardingStrategy extends HollowTypeReshardingStrategy { 9 | @Override 10 | public HollowTypeDataElementsSplitter createDataElementsSplitter(HollowTypeDataElements from, int shardingFactor) { 11 | return new HollowObjectTypeDataElementsSplitter((HollowObjectTypeDataElements) from, shardingFactor); 12 | } 13 | 14 | @Override 15 | public HollowTypeDataElementsJoiner createDataElementsJoiner(HollowTypeDataElements[] from) { 16 | return new HollowObjectTypeDataElementsJoiner((HollowObjectTypeDataElements[]) from); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/engine/set/HollowSetTypeReshardingStrategy.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.read.engine.set; 2 | 3 | import com.netflix.hollow.core.read.engine.HollowTypeDataElements; 4 | import com.netflix.hollow.core.read.engine.HollowTypeDataElementsJoiner; 5 | import com.netflix.hollow.core.read.engine.HollowTypeDataElementsSplitter; 6 | import com.netflix.hollow.core.read.engine.HollowTypeReshardingStrategy; 7 | 8 | public class HollowSetTypeReshardingStrategy extends HollowTypeReshardingStrategy { 9 | @Override 10 | public HollowTypeDataElementsSplitter createDataElementsSplitter(HollowTypeDataElements from, int shardingFactor) { 11 | return new HollowSetTypeDataElementsSplitter((HollowSetTypeDataElements) from, shardingFactor); 12 | } 13 | 14 | @Override 15 | public HollowTypeDataElementsJoiner createDataElementsJoiner(HollowTypeDataElements[] from) { 16 | return new HollowSetTypeDataElementsJoiner((HollowSetTypeDataElements[]) from); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/iterator/EmptyMapOrdinalIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.read.iterator; 18 | 19 | import java.util.NoSuchElementException; 20 | 21 | public class EmptyMapOrdinalIterator implements HollowMapEntryOrdinalIterator { 22 | 23 | public static final EmptyMapOrdinalIterator INSTANCE = new EmptyMapOrdinalIterator(); 24 | 25 | private EmptyMapOrdinalIterator() { } 26 | 27 | @Override 28 | public boolean next() { 29 | return false; 30 | } 31 | 32 | @Override 33 | public int getKey() { 34 | throw new NoSuchElementException("This MapEntryOrdinalIterator is empty"); 35 | } 36 | 37 | @Override 38 | public int getValue() { 39 | throw new NoSuchElementException("This MapEntryOrdinalIterator is empty"); 40 | } 41 | 42 | 43 | 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/iterator/EmptyOrdinalIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.read.iterator; 18 | 19 | public class EmptyOrdinalIterator implements HollowOrdinalIterator { 20 | 21 | public static final EmptyOrdinalIterator INSTANCE = new EmptyOrdinalIterator(); 22 | 23 | private EmptyOrdinalIterator() { } 24 | 25 | @Override 26 | public int next() { 27 | return NO_MORE_ORDINALS; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/read/iterator/HollowMapEntryOrdinalIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.read.iterator; 18 | 19 | /** 20 | * A {@link HollowMapEntryOrdinalIterator} allows for iteration over key/value entries in a Hollow MAP record. 21 | *

22 | * The pattern for usage is: 23 | *

24 |  * {@code
25 |  * HollowMapEntryOrdinalIterator iter = /// some iterator
26 |  * while(iter.next()) {
27 |  *     int keyOrdinal = iter.getKey();
28 |  *     int valueOrdinal = iter.getValue();
29 |  * }
30 |  * }
31 |  * 
32 | */ 33 | public interface HollowMapEntryOrdinalIterator { 34 | 35 | public boolean next(); 36 | 37 | public int getKey(); 38 | public int getValue(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/schema/HollowCollectionSchema.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.schema; 18 | 19 | import com.netflix.hollow.core.read.engine.HollowTypeReadState; 20 | 21 | /** 22 | * A schema for a Collection record type -- parent class of both {@link HollowListSchema} or a {@link HollowSetSchema} 23 | * 24 | * @see HollowSchema 25 | * 26 | * @author dkoszewnik 27 | * 28 | */ 29 | public abstract class HollowCollectionSchema extends HollowSchema { 30 | 31 | public HollowCollectionSchema(String name) { 32 | super(name); 33 | } 34 | 35 | public abstract String getElementType(); 36 | 37 | public abstract HollowTypeReadState getElementTypeState(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/FloatHollowFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type; 18 | 19 | import com.netflix.hollow.api.custom.HollowTypeAPI; 20 | import com.netflix.hollow.api.objects.provider.HollowFactory; 21 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 22 | import com.netflix.hollow.core.type.delegate.FloatDelegateCachedImpl; 23 | 24 | public class FloatHollowFactory extends HollowFactory { 25 | 26 | @Override 27 | public HFloat newHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 28 | return new HFloat(((FloatTypeAPI)typeAPI).getDelegateLookupImpl(), ordinal); 29 | } 30 | 31 | @Override 32 | public HFloat newCachedHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 33 | return new HFloat(new FloatDelegateCachedImpl((FloatTypeAPI)typeAPI, ordinal), ordinal); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/HFloat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type; 18 | 19 | import com.netflix.hollow.api.custom.HollowAPI; 20 | import com.netflix.hollow.api.objects.HollowObject; 21 | import com.netflix.hollow.core.type.delegate.FloatDelegate; 22 | 23 | public class HFloat extends HollowObject { 24 | 25 | public HFloat(FloatDelegate delegate, int ordinal) { 26 | super(delegate, ordinal); 27 | } 28 | 29 | public float getValue() { 30 | return delegate().getValue(ordinal); 31 | } 32 | 33 | public Float getValueBoxed() { 34 | return delegate().getValueBoxed(ordinal); 35 | } 36 | 37 | public HollowAPI api() { 38 | return typeApi().getAPI(); 39 | } 40 | 41 | public FloatTypeAPI typeApi() { 42 | return delegate().getTypeAPI(); 43 | } 44 | 45 | protected FloatDelegate delegate() { 46 | return (FloatDelegate)delegate; 47 | } 48 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/HLong.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type; 18 | 19 | import com.netflix.hollow.api.custom.HollowAPI; 20 | import com.netflix.hollow.api.objects.HollowObject; 21 | import com.netflix.hollow.core.type.delegate.LongDelegate; 22 | 23 | public class HLong extends HollowObject { 24 | 25 | public HLong(LongDelegate delegate, int ordinal) { 26 | super(delegate, ordinal); 27 | } 28 | 29 | public long getValue() { 30 | return delegate().getValue(ordinal); 31 | } 32 | 33 | public Long getValueBoxed() { 34 | return delegate().getValueBoxed(ordinal); 35 | } 36 | 37 | public HollowAPI api() { 38 | return typeApi().getAPI(); 39 | } 40 | 41 | public LongTypeAPI typeApi() { 42 | return delegate().getTypeAPI(); 43 | } 44 | 45 | protected LongDelegate delegate() { 46 | return (LongDelegate)delegate; 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/LongHollowFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type; 18 | 19 | import com.netflix.hollow.api.custom.HollowTypeAPI; 20 | import com.netflix.hollow.api.objects.provider.HollowFactory; 21 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 22 | import com.netflix.hollow.core.type.delegate.LongDelegateCachedImpl; 23 | 24 | public class LongHollowFactory extends HollowFactory { 25 | 26 | @Override 27 | public HLong newHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 28 | return new HLong(((LongTypeAPI)typeAPI).getDelegateLookupImpl(), ordinal); 29 | } 30 | 31 | @Override 32 | public HLong newCachedHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 33 | return new HLong(new LongDelegateCachedImpl((LongTypeAPI)typeAPI, ordinal), ordinal); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/StringHollowFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type; 18 | 19 | import com.netflix.hollow.api.custom.HollowTypeAPI; 20 | import com.netflix.hollow.api.objects.provider.HollowFactory; 21 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 22 | import com.netflix.hollow.core.type.delegate.StringDelegateCachedImpl; 23 | 24 | public class StringHollowFactory extends HollowFactory { 25 | 26 | @Override 27 | public HString newHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 28 | return new HString(((StringTypeAPI)typeAPI).getDelegateLookupImpl(), ordinal); 29 | } 30 | 31 | @Override 32 | public HString newCachedHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 33 | return new HString(new StringDelegateCachedImpl((StringTypeAPI)typeAPI, ordinal), ordinal); 34 | } 35 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/delegate/BooleanDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type.delegate; 18 | 19 | import com.netflix.hollow.api.objects.delegate.HollowObjectDelegate; 20 | import com.netflix.hollow.core.type.BooleanTypeAPI; 21 | 22 | public interface BooleanDelegate extends HollowObjectDelegate { 23 | 24 | public boolean getValue(int ordinal); 25 | 26 | public Boolean getValueBoxed(int ordinal); 27 | 28 | @Override 29 | public BooleanTypeAPI getTypeAPI(); 30 | 31 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/delegate/DoubleDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type.delegate; 18 | 19 | import com.netflix.hollow.api.objects.delegate.HollowObjectDelegate; 20 | import com.netflix.hollow.core.type.DoubleTypeAPI; 21 | 22 | public interface DoubleDelegate extends HollowObjectDelegate { 23 | 24 | public double getValue(int ordinal); 25 | 26 | public Double getValueBoxed(int ordinal); 27 | 28 | @Override 29 | public DoubleTypeAPI getTypeAPI(); 30 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/delegate/FloatDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type.delegate; 18 | 19 | import com.netflix.hollow.api.objects.delegate.HollowObjectDelegate; 20 | import com.netflix.hollow.core.type.FloatTypeAPI; 21 | 22 | public interface FloatDelegate extends HollowObjectDelegate { 23 | 24 | public float getValue(int ordinal); 25 | 26 | public Float getValueBoxed(int ordinal); 27 | 28 | @Override 29 | public FloatTypeAPI getTypeAPI(); 30 | 31 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/delegate/IntegerDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type.delegate; 18 | 19 | import com.netflix.hollow.api.objects.delegate.HollowObjectDelegate; 20 | import com.netflix.hollow.core.type.IntegerTypeAPI; 21 | 22 | public interface IntegerDelegate extends HollowObjectDelegate { 23 | 24 | public int getValue(int ordinal); 25 | 26 | public Integer getValueBoxed(int ordinal); 27 | 28 | @Override 29 | public IntegerTypeAPI getTypeAPI(); 30 | 31 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/delegate/LongDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type.delegate; 18 | 19 | import com.netflix.hollow.api.objects.delegate.HollowObjectDelegate; 20 | import com.netflix.hollow.core.type.LongTypeAPI; 21 | 22 | @SuppressWarnings("all") 23 | public interface LongDelegate extends HollowObjectDelegate { 24 | 25 | public long getValue(int ordinal); 26 | 27 | public Long getValueBoxed(int ordinal); 28 | 29 | @Override 30 | public LongTypeAPI getTypeAPI(); 31 | 32 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/type/delegate/StringDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.type.delegate; 18 | 19 | import com.netflix.hollow.api.objects.delegate.HollowObjectDelegate; 20 | import com.netflix.hollow.core.type.StringTypeAPI; 21 | 22 | public interface StringDelegate extends HollowObjectDelegate { 23 | 24 | public String getValue(int ordinal); 25 | 26 | public boolean isValueEqual(int ordinal, String testValue); 27 | 28 | @Override 29 | public StringTypeAPI getTypeAPI(); 30 | 31 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/util/AllHollowRecordCollection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.util; 18 | 19 | import com.netflix.hollow.core.read.engine.HollowTypeReadState; 20 | import com.netflix.hollow.core.read.engine.PopulatedOrdinalListener; 21 | 22 | public abstract class AllHollowRecordCollection extends HollowRecordCollection { 23 | 24 | public AllHollowRecordCollection(HollowTypeReadState typeState) { 25 | super(typeState.getListener(PopulatedOrdinalListener.class).getPopulatedOrdinals()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/util/Versions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.util; 18 | 19 | import static com.netflix.hollow.core.HollowConstants.VERSION_LATEST; 20 | import static com.netflix.hollow.core.HollowConstants.VERSION_NONE; 21 | 22 | public final class Versions { 23 | 24 | // visible for testing 25 | static final String PRETTY_VERSION_NONE = "none"; 26 | static final String PRETTY_VERSION_LATEST = "latest"; 27 | 28 | private Versions() {} 29 | 30 | public static String prettyVersion(long version) { 31 | if (version == VERSION_NONE) { 32 | return PRETTY_VERSION_NONE; 33 | } else if (version == VERSION_LATEST) { 34 | return PRETTY_VERSION_LATEST; 35 | } else { 36 | return String.valueOf(version); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/write/HollowHashableWriteRecord.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write; 18 | 19 | import com.netflix.hollow.core.memory.ByteDataArray; 20 | 21 | public interface HollowHashableWriteRecord extends HollowWriteRecord { 22 | 23 | public void writeDataTo(ByteDataArray buf, HashBehavior hashBehavior); 24 | 25 | 26 | public enum HashBehavior { 27 | IGNORED_HASHES, 28 | UNMIXED_HASHES, 29 | MIXED_HASHES 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/write/HollowWriteRecord.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write; 18 | 19 | import com.netflix.hollow.core.memory.ByteDataArray; 20 | 21 | public interface HollowWriteRecord { 22 | 23 | public void writeDataTo(ByteDataArray buf); 24 | 25 | public void reset(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/write/objectmapper/HollowInline.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Indicates that a field of a POJO is inlined as a value rather than 26 | * a reference. 27 | *

28 | * The field's type must a be boxed primitive type or {@code String}. 29 | */ 30 | @Retention(RetentionPolicy.RUNTIME) 31 | @Target( {ElementType.FIELD}) 32 | public @interface HollowInline { 33 | } -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/write/objectmapper/HollowTransient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Indicates that a field of a POJO is to be ignored. 26 | *

27 | * This annotation should be used when the {@code transient} field 28 | * modifier cannot be declared (for example if a JVM compatible 29 | * language is used to represent the POJOs and there are limitations 30 | * in expressing corresponding transient fields in Java byte code). 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.FIELD) 34 | public @interface HollowTransient { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/write/objectmapper/NullablePrimitiveBoolean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | /** 20 | * @deprecated Use the @HollowInline annotation with a Boolean field instead. 21 | */ 22 | @Deprecated 23 | public enum NullablePrimitiveBoolean { 24 | TRUE, 25 | FALSE; 26 | 27 | public boolean getBooleanValue() { 28 | return this == TRUE; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/core/write/objectmapper/flatrecords/HollowSchemaIdentifierMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper.flatrecords; 18 | 19 | import com.netflix.hollow.core.schema.HollowObjectSchema.FieldType; 20 | import com.netflix.hollow.core.schema.HollowSchema; 21 | 22 | public interface HollowSchemaIdentifierMapper { 23 | 24 | public HollowSchema getSchema(int identifier); 25 | 26 | public FieldType[] getPrimaryKeyFieldTypes(int identifier); 27 | 28 | public int getSchemaId(HollowSchema schema); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/tools/filter/FixedLengthArrayWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.tools.filter; 18 | 19 | import com.netflix.hollow.core.memory.encoding.FixedLengthElementArray; 20 | 21 | class FixedLengthArrayWriter { 22 | 23 | private final FixedLengthElementArray arr; 24 | private long bitCursor; 25 | 26 | public FixedLengthArrayWriter(FixedLengthElementArray arr) { 27 | this.arr = arr; 28 | } 29 | 30 | public void writeField(long value, int numBits) { 31 | arr.setElementValue(bitCursor, numBits, value); 32 | bitCursor += numBits; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/tools/history/HollowHistoricalSchemaChange.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.tools.history; 18 | 19 | import com.netflix.hollow.core.schema.HollowSchema; 20 | 21 | public class HollowHistoricalSchemaChange { 22 | 23 | private final HollowSchema beforeSchema; 24 | private final HollowSchema afterSchema; 25 | 26 | public HollowHistoricalSchemaChange(HollowSchema beforeSchema, HollowSchema afterSchema) { 27 | this.beforeSchema = beforeSchema; 28 | this.afterSchema = afterSchema; 29 | } 30 | 31 | public HollowSchema getBeforeSchema() { 32 | return beforeSchema; 33 | } 34 | 35 | public HollowSchema getAfterSchema() { 36 | return afterSchema; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /hollow/src/main/java/com/netflix/hollow/tools/split/HollowSplitterCopyDirector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.tools.split; 18 | 19 | import com.netflix.hollow.core.read.engine.HollowTypeReadState; 20 | 21 | public interface HollowSplitterCopyDirector { 22 | 23 | public String[] getTopLevelTypes(); 24 | 25 | public int getNumShards(); 26 | 27 | public int getShard(HollowTypeReadState topLevelType, int ordinal); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/api/codegen/HollowBooleanFieldErgonomicsAPIGeneratorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.netflix.hollow.api.codegen; 17 | 18 | import org.junit.Test; 19 | 20 | public class HollowBooleanFieldErgonomicsAPIGeneratorTest extends AbstractHollowAPIGeneratorTest { 21 | 22 | @Test 23 | public void test() throws Exception { 24 | String apiClassName = "BooleanErgoTestAPI"; 25 | String packageName = "codegen.booleanfield.ergo"; 26 | runGenerator(apiClassName, packageName, Movie.class, 27 | builder -> builder.withBooleanFieldErgonomics(true).withGeneratedAnnotation()); 28 | assertClassHasGeneratedAnnotation(packageName + "." + apiClassName); 29 | } 30 | 31 | static class Movie { 32 | int id; 33 | boolean playable; 34 | boolean value; 35 | boolean isAction; 36 | Boolean hasSubtitles; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/api/objects/provider/Util.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.api.objects.provider; 18 | 19 | import static java.util.Objects.requireNonNull; 20 | 21 | import java.util.concurrent.atomic.AtomicReference; 22 | import java.util.function.Supplier; 23 | 24 | interface Util { 25 | static Supplier memoize(Supplier supplier) { 26 | AtomicReference value = new AtomicReference<>(); 27 | return () -> { 28 | T val = value.get(); 29 | if (val == null) 30 | val = value.updateAndGet(v -> v == null ? requireNonNull(supplier.get()) : v); 31 | return val; 32 | }; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/api/producer/model/CustomReferenceType.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.api.producer.model; 2 | 3 | public class CustomReferenceType { 4 | long id; 5 | public CustomReferenceType(long id) { 6 | this.id = id; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/api/producer/model/HasAllTypeStates.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.api.producer.model; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | import java.util.Set; 6 | 7 | public class HasAllTypeStates { 8 | CustomReferenceType customReferenceType; 9 | Set setOfStrings; 10 | List listOfInt; 11 | Map mapOfStringToLong; 12 | 13 | public HasAllTypeStates(CustomReferenceType customReferenceType, Set setOfStrings, List listOfInt, Map mapOfStringToLong) { 14 | this.customReferenceType = customReferenceType; 15 | this.setOfStrings = setOfStrings; 16 | this.listOfInt = listOfInt; 17 | this.mapOfStringToLong = mapOfStringToLong; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/index/GrowingSegmentedLongArrayTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.index; 18 | 19 | import com.netflix.hollow.core.memory.pool.WastefulRecycler; 20 | import org.junit.Assert; 21 | import org.junit.Test; 22 | 23 | public class GrowingSegmentedLongArrayTest { 24 | 25 | @Test 26 | public void growsToFit() { 27 | GrowingSegmentedLongArray arr = new GrowingSegmentedLongArray(WastefulRecycler.SMALL_ARRAY_RECYCLER); 28 | 29 | for(int i=0;i<100000;i++) { 30 | Assert.assertEquals(0, arr.get(i)); 31 | } 32 | 33 | for(int i=0;i<100000;i++) { 34 | arr.set(i, i); 35 | } 36 | 37 | for(int i=0;i<100000;i++) { 38 | Assert.assertEquals(i, arr.get(i)); 39 | } 40 | 41 | arr.destroy(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/schema/HollowSchemaHashTest.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.schema; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import static org.junit.Assert.assertNotEquals; 5 | import static org.junit.Assert.assertNotNull; 6 | 7 | import com.netflix.hollow.core.read.engine.HollowReadStateEngine; 8 | import com.netflix.hollow.core.write.objectmapper.HollowPrimaryKey; 9 | import com.netflix.hollow.test.HollowReadStateEngineBuilder; 10 | import java.util.Arrays; 11 | import java.util.Map; 12 | import org.junit.Test; 13 | 14 | public class HollowSchemaHashTest { 15 | 16 | @HollowPrimaryKey(fields = "id") 17 | class Movie { 18 | int id; 19 | Map aMap; 20 | } 21 | 22 | @Test 23 | public void schemaHashTest() { 24 | SimpleHollowDataset dataset = SimpleHollowDataset.fromClassDefinitions(Long.class, Movie.class); 25 | HollowReadStateEngine readState = new HollowReadStateEngineBuilder(Arrays.asList(Long.class, Movie.class)).build(); 26 | 27 | HollowSchemaHash hollowSchemaHash1 = new HollowSchemaHash(dataset.getSchemas()); 28 | HollowSchemaHash hollowSchemaHash2 = new HollowSchemaHash(readState.getSchemas()); 29 | 30 | assertEquals(hollowSchemaHash1, hollowSchemaHash2); 31 | assertNotNull(hollowSchemaHash1.getHash()); 32 | assertNotEquals("", hollowSchemaHash1.getHash()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/util/VersionsTest.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.util; 2 | 3 | import static com.netflix.hollow.core.HollowConstants.VERSION_LATEST; 4 | import static com.netflix.hollow.core.HollowConstants.VERSION_NONE; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | public class VersionsTest { 10 | 11 | @Test 12 | public void testPrettyPrint() { 13 | Assert.assertEquals(Versions.PRETTY_VERSION_NONE, Versions.prettyVersion(VERSION_NONE)); 14 | Assert.assertEquals(Versions.PRETTY_VERSION_LATEST, Versions.prettyVersion(VERSION_LATEST)); 15 | Assert.assertEquals("123", Versions.prettyVersion(123l)); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/DirectCircularReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | 20 | /** 21 | * Sample type that represents a direct circular reference between 2 classes. 22 | */ 23 | @SuppressWarnings("unused") 24 | public class DirectCircularReference { 25 | 26 | private final String name; 27 | private final DirectCircularReference child; 28 | 29 | public DirectCircularReference(String name, DirectCircularReference child) { 30 | this.name = name; 31 | this.child = child; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/DirectListCircularReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | import java.util.List; 20 | 21 | /** 22 | * Sample type that represents a direct circular reference between 2 classes, with a List containing the child. 23 | */ 24 | @SuppressWarnings("unused") 25 | public class DirectListCircularReference { 26 | 27 | private final String name; 28 | private final List children; 29 | 30 | public DirectListCircularReference(String name, List children) { 31 | this.name = name; 32 | this.children = children; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/DirectMapCircularReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | import java.util.Map; 20 | 21 | /** 22 | * Sample type that represents a direct circular reference between 2 classes, with a Map containing the child. 23 | */ 24 | @SuppressWarnings("unused") 25 | public class DirectMapCircularReference { 26 | 27 | private final String name; 28 | private final Map children; 29 | 30 | public DirectMapCircularReference(String name, Map children) { 31 | this.name = name; 32 | this.children = children; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/DirectSetCircularReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | import java.util.Set; 20 | 21 | /** 22 | * Sample type that represents a direct circular reference between 2 classes, with a Set containing the child. 23 | */ 24 | @SuppressWarnings("unused") 25 | public class DirectSetCircularReference { 26 | 27 | private final String name; 28 | private final Set children; 29 | 30 | public DirectSetCircularReference(String name, Set children) { 31 | this.name = name; 32 | this.children = children; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/IndirectCircularReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | /** 20 | * Object model representing an indirect or nested circular reference: 21 | * 22 | * E depends on F, F depends on G, and G depends back on E 23 | */ 24 | @SuppressWarnings("unused") 25 | public class IndirectCircularReference { 26 | 27 | class TypeE { 28 | private final TypeF f; 29 | 30 | public TypeE(TypeF f) { 31 | this.f = f; 32 | } 33 | } 34 | class TypeF { 35 | private final TypeG g; 36 | 37 | public TypeF(TypeG g) { 38 | this.g = g; 39 | } 40 | } 41 | class TypeG { 42 | private final TypeE e; 43 | 44 | public TypeG(TypeE e) { 45 | this.e = e; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/TypeA.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | import java.util.Set; 20 | 21 | public class TypeA { 22 | 23 | private final String a1; 24 | private final int a2; 25 | private final TypeB b; 26 | private final Set cList; 27 | 28 | public TypeA(String a1, int a2, TypeB b, Set cList) { 29 | this.a1 = a1; 30 | this.a2 = a2; 31 | this.b = b; 32 | this.cList = cList; 33 | } 34 | 35 | public String getA1() { 36 | return a1; 37 | } 38 | 39 | public int getA2() { 40 | return a2; 41 | } 42 | 43 | public TypeB getB() { 44 | return b; 45 | } 46 | 47 | public Set getCList() { 48 | return cList; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/TypeB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | public class TypeB { 20 | 21 | private final short b1; 22 | private final long b2; 23 | private final float b3; 24 | private final char[] b4; 25 | private final byte[] b5; 26 | 27 | public TypeB(short b1, long b2, float b3, char[] b4, byte[] b5) { 28 | this.b1 = b1; 29 | this.b2 = b2; 30 | this.b3 = b3; 31 | this.b4 = b4; 32 | this.b5 = b5; 33 | } 34 | 35 | public short getB1() { 36 | return b1; 37 | } 38 | public long getB2() { 39 | return b2; 40 | } 41 | public float getB3() { 42 | return b3; 43 | } 44 | public char[] getB4() { 45 | return b4; 46 | } 47 | public byte[] getB5() { 48 | return b5; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/TypeC.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package com.netflix.hollow.core.write.objectmapper; 18 | 19 | import java.util.List; 20 | import java.util.Map; 21 | 22 | public class TypeC { 23 | 24 | private final char c1; 25 | private final Map> map; 26 | 27 | public TypeC(char c1, Map> map) { 28 | this.c1 = c1; 29 | this.map = map; 30 | } 31 | 32 | public char getC1() { 33 | return c1; 34 | } 35 | public Map> getMap() { 36 | return map; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/TypeD.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.write.objectmapper; 2 | 3 | public class TypeD { 4 | @HollowInline private final String inlinedString; 5 | 6 | public TypeD(String inlinedString) { 7 | this.inlinedString = inlinedString; 8 | } 9 | 10 | public String getInlinedString() { 11 | return inlinedString; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/TypeE.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.core.write.objectmapper; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public class TypeE { 7 | private Map map; 8 | private Map, Integer> mapWithList; 9 | private Map> mapWithString; 10 | 11 | public TypeE( 12 | Map map, 13 | Map, Integer> mapWithList, 14 | Map> mapWithString 15 | ) { 16 | this.map = map; 17 | this.mapWithList = mapWithList; 18 | this.mapWithString = mapWithString; 19 | } 20 | 21 | public static class SubType { 22 | private String name; 23 | private Integer year; 24 | 25 | public SubType(String name, Integer year) { 26 | this.name = name; 27 | this.year = year; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/dto/movie/Award.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.dto.movie; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowTypeName; 4 | 5 | public class Award { 6 | @HollowTypeName(name = "TestAwardName") 7 | public String name; 8 | public int year; 9 | 10 | public Award(String name, int year) { 11 | this.name = name; 12 | this.year = year; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/dto/movie/CastMember.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.dto.movie; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowInline; 4 | 5 | public class CastMember { 6 | public int id; 7 | @HollowInline String name; 8 | public CastRole role; 9 | 10 | public CastMember(int id, String name, CastRole role) { 11 | this.id = id; 12 | this.name = name; 13 | this.role = role; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/dto/movie/CastRole.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.dto.movie; 2 | 3 | public enum CastRole { 4 | DIRECTOR, 5 | ACTOR, 6 | WRITER, 7 | PRODUCER 8 | } 9 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/dto/movie/Country.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.dto.movie; 2 | 3 | 4 | import com.netflix.hollow.core.write.objectmapper.HollowInline; 5 | 6 | public class Country { 7 | @HollowInline String value; 8 | 9 | public Country(String value) { 10 | this.value = value; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/dto/movie/MaturityRating.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.dto.movie; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowTypeName; 4 | 5 | public class MaturityRating { 6 | @HollowTypeName(name = "TestMaturityRatingName") 7 | public String rating; 8 | @HollowTypeName(name = "TestMaturityAdvisoryName") 9 | public String advisory; 10 | 11 | public MaturityRating(String rating, String advisory) { 12 | this.rating = rating; 13 | this.advisory = advisory; 14 | } 15 | @Override 16 | public boolean equals(Object obj) { 17 | if (!(obj instanceof MaturityRating)) { 18 | return false; 19 | } 20 | return ((MaturityRating)obj).rating.equals(rating) && ((MaturityRating)obj).advisory.equals(advisory); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/dto/movie/Movie.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.dto.movie; 2 | 3 | 4 | import com.netflix.hollow.core.write.objectmapper.HollowHashKey; 5 | import com.netflix.hollow.core.write.objectmapper.HollowPrimaryKey; 6 | import com.netflix.hollow.core.write.objectmapper.HollowTypeName; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | import java.util.Set; 11 | 12 | @HollowPrimaryKey(fields = {"id"}) 13 | public class Movie { 14 | public int id; 15 | 16 | @HollowTypeName(name = "MovieTitle") 17 | public String title; 18 | public int releaseYear; 19 | @HollowTypeName(name = "MovieGenre") 20 | public String primaryGenre; 21 | public MaturityRating maturityRating; 22 | 23 | public Set countries; 24 | @HollowHashKey(fields = {"value"}) 25 | public Map tags; 26 | 27 | @HollowHashKey(fields = {"id"}) 28 | public Set cast; 29 | 30 | public List awardsReceived; 31 | } 32 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/dto/movie/Tag.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.dto.movie; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowInline; 4 | 5 | public class Tag { 6 | @HollowInline String value; 7 | 8 | public Tag(String value) { 9 | this.value = value; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/dto/movie/TagValue.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.dto.movie; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowInline; 4 | 5 | public class TagValue { 6 | @HollowInline public String value; 7 | 8 | public TagValue(String value) { 9 | this.value = value; 10 | } 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/Award.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.objects.HollowObject; 4 | 5 | @SuppressWarnings("all") 6 | public class Award extends HollowObject { 7 | 8 | public Award(AwardDelegate delegate, int ordinal) { 9 | super(delegate, ordinal); 10 | } 11 | 12 | public long getId() { 13 | return delegate().getId(ordinal); 14 | } 15 | 16 | public Long getIdBoxed() { 17 | return delegate().getIdBoxed(ordinal); 18 | } 19 | 20 | public Movie getWinner() { 21 | int refOrdinal = delegate().getWinnerOrdinal(ordinal); 22 | if(refOrdinal == -1) 23 | return null; 24 | return api().getMovie(refOrdinal); 25 | } 26 | 27 | public SetOfMovie getNominees() { 28 | int refOrdinal = delegate().getNomineesOrdinal(ordinal); 29 | if(refOrdinal == -1) 30 | return null; 31 | return api().getSetOfMovie(refOrdinal); 32 | } 33 | 34 | public AwardsAPI api() { 35 | return typeApi().getAPI(); 36 | } 37 | 38 | public AwardTypeAPI typeApi() { 39 | return delegate().getTypeAPI(); 40 | } 41 | 42 | protected AwardDelegate delegate() { 43 | return (AwardDelegate)delegate; 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/AwardDataAccessor.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.consumer.HollowConsumer; 4 | import com.netflix.hollow.api.consumer.data.AbstractHollowDataAccessor; 5 | import com.netflix.hollow.core.index.key.PrimaryKey; 6 | import com.netflix.hollow.core.read.engine.HollowReadStateEngine; 7 | 8 | @SuppressWarnings("all") 9 | public class AwardDataAccessor extends AbstractHollowDataAccessor { 10 | 11 | public static final String TYPE = "Award"; 12 | private AwardsAPI api; 13 | 14 | public AwardDataAccessor(HollowConsumer consumer) { 15 | super(consumer, TYPE); 16 | this.api = (AwardsAPI)consumer.getAPI(); 17 | } 18 | 19 | public AwardDataAccessor(HollowReadStateEngine rStateEngine, AwardsAPI api) { 20 | super(rStateEngine, TYPE); 21 | this.api = api; 22 | } 23 | 24 | public AwardDataAccessor(HollowReadStateEngine rStateEngine, AwardsAPI api, String ... fieldPaths) { 25 | super(rStateEngine, TYPE, fieldPaths); 26 | this.api = api; 27 | } 28 | 29 | public AwardDataAccessor(HollowReadStateEngine rStateEngine, AwardsAPI api, PrimaryKey primaryKey) { 30 | super(rStateEngine, TYPE, primaryKey); 31 | this.api = api; 32 | } 33 | 34 | @Override public Award getRecord(int ordinal){ 35 | return api.getAward(ordinal); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/AwardDelegate.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.objects.delegate.HollowObjectDelegate; 4 | 5 | 6 | @SuppressWarnings("all") 7 | public interface AwardDelegate extends HollowObjectDelegate { 8 | 9 | public long getId(int ordinal); 10 | 11 | public Long getIdBoxed(int ordinal); 12 | 13 | public int getWinnerOrdinal(int ordinal); 14 | 15 | public int getNomineesOrdinal(int ordinal); 16 | 17 | public AwardTypeAPI getTypeAPI(); 18 | 19 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/AwardDelegateLookupImpl.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.objects.delegate.HollowObjectAbstractDelegate; 4 | import com.netflix.hollow.core.read.dataaccess.HollowObjectTypeDataAccess; 5 | import com.netflix.hollow.core.schema.HollowObjectSchema; 6 | 7 | @SuppressWarnings("all") 8 | public class AwardDelegateLookupImpl extends HollowObjectAbstractDelegate implements AwardDelegate { 9 | 10 | private final AwardTypeAPI typeAPI; 11 | 12 | public AwardDelegateLookupImpl(AwardTypeAPI typeAPI) { 13 | this.typeAPI = typeAPI; 14 | } 15 | 16 | public long getId(int ordinal) { 17 | return typeAPI.getId(ordinal); 18 | } 19 | 20 | public Long getIdBoxed(int ordinal) { 21 | return typeAPI.getIdBoxed(ordinal); 22 | } 23 | 24 | public int getWinnerOrdinal(int ordinal) { 25 | return typeAPI.getWinnerOrdinal(ordinal); 26 | } 27 | 28 | public int getNomineesOrdinal(int ordinal) { 29 | return typeAPI.getNomineesOrdinal(ordinal); 30 | } 31 | 32 | public AwardTypeAPI getTypeAPI() { 33 | return typeAPI; 34 | } 35 | 36 | @Override 37 | public HollowObjectSchema getSchema() { 38 | return typeAPI.getTypeDataAccess().getSchema(); 39 | } 40 | 41 | @Override 42 | public HollowObjectTypeDataAccess getTypeDataAccess() { 43 | return typeAPI.getTypeDataAccess(); 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/AwardHollowFactory.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.custom.HollowTypeAPI; 4 | import com.netflix.hollow.api.objects.provider.HollowFactory; 5 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 6 | 7 | @SuppressWarnings("all") 8 | public class AwardHollowFactory extends HollowFactory { 9 | 10 | @Override 11 | public T newHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 12 | return (T)new Award(((AwardTypeAPI)typeAPI).getDelegateLookupImpl(), ordinal); 13 | } 14 | 15 | @Override 16 | public T newCachedHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 17 | return (T)new Award(new AwardDelegateCachedImpl((AwardTypeAPI)typeAPI, ordinal), ordinal); 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/AwardsAPIFactory.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.client.HollowAPIFactory; 4 | import com.netflix.hollow.api.custom.HollowAPI; 5 | import com.netflix.hollow.api.objects.provider.HollowFactory; 6 | import com.netflix.hollow.core.read.dataaccess.HollowDataAccess; 7 | import java.util.Collections; 8 | import java.util.Set; 9 | 10 | @SuppressWarnings("all") 11 | public class AwardsAPIFactory implements HollowAPIFactory { 12 | 13 | private final Set cachedTypes; 14 | 15 | public AwardsAPIFactory() { 16 | this(Collections.emptySet()); 17 | } 18 | 19 | public AwardsAPIFactory(Set cachedTypes) { 20 | this.cachedTypes = cachedTypes; 21 | } 22 | 23 | @Override 24 | public HollowAPI createAPI(HollowDataAccess dataAccess) { 25 | return new AwardsAPI(dataAccess, cachedTypes); 26 | } 27 | 28 | @Override 29 | public HollowAPI createAPI(HollowDataAccess dataAccess, HollowAPI previousCycleAPI) { 30 | if (!(previousCycleAPI instanceof AwardsAPI)) { 31 | throw new ClassCastException(previousCycleAPI.getClass() + " not instance of AwardsAPI"); } 32 | return new AwardsAPI(dataAccess, cachedTypes, Collections.>emptyMap(), (AwardsAPI) previousCycleAPI); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/MovieDataAccessor.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.consumer.HollowConsumer; 4 | import com.netflix.hollow.api.consumer.data.AbstractHollowDataAccessor; 5 | import com.netflix.hollow.core.index.key.PrimaryKey; 6 | import com.netflix.hollow.core.read.engine.HollowReadStateEngine; 7 | 8 | @SuppressWarnings("all") 9 | public class MovieDataAccessor extends AbstractHollowDataAccessor { 10 | 11 | public static final String TYPE = "Movie"; 12 | private AwardsAPI api; 13 | 14 | public MovieDataAccessor(HollowConsumer consumer) { 15 | super(consumer, TYPE); 16 | this.api = (AwardsAPI)consumer.getAPI(); 17 | } 18 | 19 | public MovieDataAccessor(HollowReadStateEngine rStateEngine, AwardsAPI api) { 20 | super(rStateEngine, TYPE); 21 | this.api = api; 22 | } 23 | 24 | public MovieDataAccessor(HollowReadStateEngine rStateEngine, AwardsAPI api, String ... fieldPaths) { 25 | super(rStateEngine, TYPE, fieldPaths); 26 | this.api = api; 27 | } 28 | 29 | public MovieDataAccessor(HollowReadStateEngine rStateEngine, AwardsAPI api, PrimaryKey primaryKey) { 30 | super(rStateEngine, TYPE, primaryKey); 31 | this.api = api; 32 | } 33 | 34 | @Override public Movie getRecord(int ordinal){ 35 | return api.getMovie(ordinal); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/MovieDelegate.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.objects.delegate.HollowObjectDelegate; 4 | 5 | 6 | @SuppressWarnings("all") 7 | public interface MovieDelegate extends HollowObjectDelegate { 8 | 9 | public long getId(int ordinal); 10 | 11 | public Long getIdBoxed(int ordinal); 12 | 13 | public String getTitle(int ordinal); 14 | 15 | public boolean isTitleEqual(int ordinal, String testValue); 16 | 17 | public int getTitleOrdinal(int ordinal); 18 | 19 | public int getYear(int ordinal); 20 | 21 | public Integer getYearBoxed(int ordinal); 22 | 23 | public MovieTypeAPI getTypeAPI(); 24 | 25 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/MovieHollowFactory.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.custom.HollowTypeAPI; 4 | import com.netflix.hollow.api.objects.provider.HollowFactory; 5 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 6 | 7 | @SuppressWarnings("all") 8 | public class MovieHollowFactory extends HollowFactory { 9 | 10 | @Override 11 | public T newHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 12 | return (T)new Movie(((MovieTypeAPI)typeAPI).getDelegateLookupImpl(), ordinal); 13 | } 14 | 15 | @Override 16 | public T newCachedHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 17 | return (T)new Movie(new MovieDelegateCachedImpl((MovieTypeAPI)typeAPI, ordinal), ordinal); 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/SetOfMovie.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.objects.HollowSet; 4 | import com.netflix.hollow.api.objects.delegate.HollowSetDelegate; 5 | import com.netflix.hollow.api.objects.generic.GenericHollowRecordHelper; 6 | 7 | @SuppressWarnings("all") 8 | public class SetOfMovie extends HollowSet { 9 | 10 | public SetOfMovie(HollowSetDelegate delegate, int ordinal) { 11 | super(delegate, ordinal); 12 | } 13 | 14 | @Override 15 | public Movie instantiateElement(int ordinal) { 16 | return (Movie) api().getMovie(ordinal); 17 | } 18 | 19 | @Override 20 | public boolean equalsElement(int elementOrdinal, Object testObject) { 21 | return GenericHollowRecordHelper.equalObject(getSchema().getElementType(), elementOrdinal, testObject); 22 | } 23 | 24 | public AwardsAPI api() { 25 | return typeApi().getAPI(); 26 | } 27 | 28 | public SetOfMovieTypeAPI typeApi() { 29 | return (SetOfMovieTypeAPI) delegate.getTypeAPI(); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/SetOfMovieHollowFactory.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.custom.HollowTypeAPI; 4 | import com.netflix.hollow.api.objects.delegate.HollowSetCachedDelegate; 5 | import com.netflix.hollow.api.objects.provider.HollowFactory; 6 | import com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess; 7 | 8 | @SuppressWarnings("all") 9 | public class SetOfMovieHollowFactory extends HollowFactory { 10 | 11 | @Override 12 | public T newHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 13 | return (T)new SetOfMovie(((SetOfMovieTypeAPI)typeAPI).getDelegateLookupImpl(), ordinal); 14 | } 15 | 16 | @Override 17 | public T newCachedHollowObject(HollowTypeDataAccess dataAccess, HollowTypeAPI typeAPI, int ordinal) { 18 | return (T)new SetOfMovie(new HollowSetCachedDelegate((SetOfMovieTypeAPI)typeAPI, ordinal), ordinal); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/generated/SetOfMovieTypeAPI.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.generated; 2 | 3 | import com.netflix.hollow.api.custom.HollowSetTypeAPI; 4 | import com.netflix.hollow.api.objects.delegate.HollowSetLookupDelegate; 5 | import com.netflix.hollow.core.read.dataaccess.HollowSetTypeDataAccess; 6 | 7 | @SuppressWarnings("all") 8 | public class SetOfMovieTypeAPI extends HollowSetTypeAPI { 9 | 10 | private final HollowSetLookupDelegate delegateLookupImpl; 11 | 12 | public SetOfMovieTypeAPI(AwardsAPI api, HollowSetTypeDataAccess dataAccess) { 13 | super(api, dataAccess); 14 | this.delegateLookupImpl = new HollowSetLookupDelegate(this); 15 | } 16 | 17 | public MovieTypeAPI getElementAPI() { 18 | return getAPI().getMovieTypeAPI(); 19 | } 20 | 21 | public AwardsAPI getAPI() { 22 | return (AwardsAPI)api; 23 | } 24 | 25 | public HollowSetLookupDelegate getDelegateLookupImpl() { 26 | return delegateLookupImpl; 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/model/Award.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.model; 2 | 3 | import java.util.Set; 4 | 5 | public class Award { 6 | long id; 7 | Movie winner; 8 | Set nominees; 9 | 10 | public Award(long id, Movie winner, Set nominees) { 11 | this.id = id; 12 | this.winner = winner; 13 | this.nominees = nominees; 14 | } 15 | } -------------------------------------------------------------------------------- /hollow/src/test/java/com/netflix/hollow/test/model/Movie.java: -------------------------------------------------------------------------------- 1 | package com.netflix.hollow.test.model; 2 | 3 | import com.netflix.hollow.core.write.objectmapper.HollowPrimaryKey; 4 | 5 | @HollowPrimaryKey(fields = {"id"}) 6 | public class Movie { 7 | long id; 8 | String title; 9 | int year; 10 | 11 | public Movie(long id, String title, int year) { 12 | this.id = id; 13 | this.title = title; 14 | this.year = year; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hollow/src/test/resources/findbugs_exclude.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /hollow/src/test/resources/schema1.txt: -------------------------------------------------------------------------------- 1 | Minion @PrimaryKey(minionId) { 2 | long minionId; 3 | String name; 4 | } 5 | 6 | String { 7 | string value; 8 | } 9 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Netflix/hollow/325c60c76d507698e5a5cf8c125704ad5c4d671a/logo.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # requirements for building the docs 2 | mkdocs~=1.4 3 | mkdocs-material~=9.1 4 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'hollow-root' 2 | 3 | include 'hollow' 4 | include 'hollow-ui-tools' 5 | include 'hollow-diff-ui' 6 | include 'hollow-explorer-ui' 7 | include 'hollow-jsonadapter' 8 | include 'hollow-zenoadapter' 9 | include 'hollow-test' 10 | include 'hollow-perf' 11 | include 'hollow-fakedata' 12 | --------------------------------------------------------------------------------