code: public static void register(Iterable<String> paths, State state) throws IOException {
      try (HiveRegister hiveRegister = HiveRegister.get(state)) {
        HiveRegistrationPolicy policy = HiveRegistrationPolicyBase.getPolicy(state);
        for (String path : paths) {
          for (HiveSpec spec : policy.getHiveSpecs(new Path(path))) {
            hiveRegister.register(spec);
          }
        }
      }
    }
docs: Register the given {@link Path}s.
  
  @param paths The {@link Path}s to be registered.
  @param state A {@link State} which will be used to instantiate a {@link HiveRegister} and a
  {@link HiveRegistrationPolicy} for registering the given The {@link Path}s.