v2/spanner-change-streams-to-sharded-file-sink/src/main/java/com/google/cloud/teleport/v2/templates/transforms/AssignShardIdFn.java [128:158]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void setup() {
    boolean retry = true;
    while (retry) {
      try {
        if (spannerConfig != null) {
          spannerAccessor = SpannerAccessor.getOrCreate(spannerConfig);
        }
        mapper = new ObjectMapper();
        mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
        shardIdFetcher =
            ShardingLogicImplFetcher.getShardingLogicImpl(
                customJarPath,
                shardingCustomClassName,
                shardingCustomParameters,
                schema,
                skipDirName);
        retry = false;
      } catch (SpannerException e) {
        LOG.info("Exception in setup of AssignShardIdFn {}", e.getMessage());
        if (e.getMessage().contains("RESOURCE_EXHAUSTED")) {
          try {
            Thread.sleep(10000);
          } catch (java.lang.InterruptedException ex) {
            throw new RuntimeException(ex);
          }
        }
      } catch (Exception e) {
        throw e;
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



v2/spanner-to-sourcedb/src/main/java/com/google/cloud/teleport/v2/templates/transforms/AssignShardIdFn.java [133:163]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void setup() {
    boolean retry = true;
    while (retry) {
      try {
        if (spannerConfig != null) {
          spannerAccessor = SpannerAccessor.getOrCreate(spannerConfig);
        }
        mapper = new ObjectMapper();
        mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
        shardIdFetcher =
            ShardingLogicImplFetcher.getShardingLogicImpl(
                customJarPath,
                shardingCustomClassName,
                shardingCustomParameters,
                schema,
                skipDirName);
        retry = false;
      } catch (SpannerException e) {
        LOG.info("Exception in setup of AssignShardIdFn {}", e.getMessage());
        if (e.getMessage().contains("RESOURCE_EXHAUSTED")) {
          try {
            Thread.sleep(10000);
          } catch (java.lang.InterruptedException ex) {
            throw new RuntimeException(ex);
          }
        }
      } catch (Exception e) {
        throw e;
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



