# Unable to use OffsetStorage interface for file hash check using Kafaka Source Connector

**URL:** <https://forum.confluent.io/t/unable-to-use-offsetstorage-interface-for-file-hash-check-using-kafaka-source-connector/1941>\
**Category:** Self-Managed Connectors\
**Created:** [2 June 2021 21:08 UTC](https://forum.confluent.io/t/unable-to-use-offsetstorage-interface-for-file-hash-check-using-kafaka-source-connector/1941 "2021-06-02T21:08:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![razdanr](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@razdanr](https://forum.confluent.io/u/razdanr)\
**Post date:** [2 June 2021 21:08 UTC](https://forum.confluent.io/t/unable-to-use-offsetstorage-interface-for-file-hash-check-using-kafaka-source-connector/1941/1 "2021-06-02T21:08:14Z")

</div>

I have a given scenario where the kafka source connector checks if the file is duplicate based on the hash of the file, for example if I have two files tc1 and tc2 they have same records in them it will thus generate a same hash. If such is the case then I would log a warning stating Duplicate file received.

I wanted to use offsetStorage interface and use it like below:-

```auto
partition = ImmutableMap.of("test", recordChecksum());
Map<String, Object> offset = this.context.offsetStorageReader().offset(partition);

```

Where recordChecksum() returns the String which is the hash value of the file received by source connector. But for some reason each time I check offset value it is always null even though my sourcePartition is populated. It seems like I need to activate the offsetStorage for Connectors? As no matter what I do it never gets populated. Please help ?
