• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ExpediaGroup / beekeeper / #811

06 Apr 2026 07:31PM UTC coverage: 87.706% (-0.07%) from 87.774%
#811

push

web-flow
Merge 6da37a9c7 into 2a21fe15a

10 of 12 new or added lines in 3 files covered. (83.33%)

115 existing lines in 33 files now uncovered.

1541 of 1757 relevant lines covered (87.71%)

0.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.91
/beekeeper-core/src/main/java/com/expediagroup/beekeeper/core/validation/S3PathValidator.java
1
/**
2
 * Copyright (C) 2019-2022 Expedia, 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.expediagroup.beekeeper.core.validation;
17

18
import org.apache.commons.lang3.StringUtils;
19
import org.slf4j.Logger;
UNCOV
20
import org.slf4j.LoggerFactory;
×
21

22
public class S3PathValidator {
1✔
23

24
  private static final Logger log = LoggerFactory.getLogger(S3PathValidator.class);
25

26
  /**
1✔
27
   * The minimum number of "/" chars for partition location: s3://basePath/table/partition = 4
1✔
28
   */
1✔
29
  public static boolean validPartitionPath(String location) {
30
    boolean valid = getNumSlashes(location) >= 4;
1✔
31
    if (!valid) {
32
      log.warn("Partition \"{}\" doesn't have the correct number of levels in the path", location);
33
    }
34
    return valid;
35
  }
1✔
36

1✔
37
  /**
1✔
38
   * The minimum number of "/" chars for table location: s3://basePath/table = 3
39
   */
1✔
40
  public static boolean validTablePath(String location) {
41
    boolean valid = getNumSlashes(location) >= 3;
42
    if (!valid) {
43
      log.warn("Table \"{}\" doesn't have the correct number of levels in the path", location);
1✔
44
    }
45
    return valid;
46
  }
47

48
  private static int getNumSlashes(String location) {
49
    return StringUtils.countMatches(location, "/");
50
  }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc