Skip to content

Commit

Permalink
Fix Findbugs & Checkstyle.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushtkn committed Dec 4, 2023
1 parent ae483d0 commit 974dbc7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@

import com.google.common.annotations.VisibleForTesting;

import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.io.BoundedByteArrayOutputStream;
import org.apache.hadoop.util.functional.FutureIO;
import org.apache.tez.runtime.library.common.task.local.output.TezTaskOutput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
16 changes: 16 additions & 0 deletions tez-tools/tez-tfile-parser/findbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<FindBugsFilter>

</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

/**
* Simple record reader which reads the TFile and emits it as key, value pair.
Expand Down Expand Up @@ -86,7 +87,7 @@ private void populateKV(TFile.Reader.Scanner.Entry entry) throws IOException {
//splitpath contains the machine name. Create the key as splitPath + realKey
String keyStr = new StringBuilder()
.append(splitPath.getName()).append(":")
.append(new String(keyBytesWritable.getBytes()))
.append(new String(keyBytesWritable.getBytes(), StandardCharsets.UTF_8))
.toString();

/**
Expand Down

0 comments on commit 974dbc7

Please sign in to comment.