Skip to content

Commit

Permalink
Add add license header and rename filePath to carbonDataFileName in f…
Browse files Browse the repository at this point in the history
…illBlockIndexInfoDetails.
  • Loading branch information
watermen committed Mar 27, 2017
1 parent da4d39e commit 84477cc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/

package org.apache.carbondata.spark.testsuite.dataload

import java.io.{File, FilenameFilter}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,11 @@ protected abstract void writeBlockletInfoToFile(
* Below method will be used to fill the vlock info details
*
* @param numberOfRows number of rows in file
* @param filePath file path
* @param carbonDataFileName The name of carbonData file
* @param currentPosition current offset
*/
protected void fillBlockIndexInfoDetails(long numberOfRows,
String filePath, long currentPosition) {
protected void fillBlockIndexInfoDetails(long numberOfRows, String carbonDataFileName,
long currentPosition) {

// as min-max will change for each blocklet and second blocklet min-max can be lesser than
// the first blocklet so we need to calculate the complete block level min-max by taking
Expand Down Expand Up @@ -382,7 +382,7 @@ protected void fillBlockIndexInfoDetails(long numberOfRows,
minmax.setMaxValues(currentMaxValue);
BlockletIndex blockletIndex = new BlockletIndex(btree, minmax);
BlockIndexInfo blockIndexInfo =
new BlockIndexInfo(numberOfRows, filePath, currentPosition, blockletIndex);
new BlockIndexInfo(numberOfRows, carbonDataFileName, currentPosition, blockletIndex);
blockIndexInfoList.add(blockIndexInfo);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,10 @@ private void writeDataToFile(FileChannel channel, byte[][] dataChunkBytes) {
* Below method will be used to fill the block info details
*
* @param numberOfRows number of rows in file
* @param filePath file path
* @param carbonDataFileName The name of carbonData file
* @param currentPosition current offset
*/
protected void fillBlockIndexInfoDetails(long numberOfRows, String filePath,
protected void fillBlockIndexInfoDetails(long numberOfRows, String carbonDataFileName,
long currentPosition) {
byte[][] currentMinValue = new byte[blockletIndex.get(0).min_max_index.max_values.size()][];
byte[][] currentMaxValue = new byte[blockletIndex.get(0).min_max_index.max_values.size()][];
Expand Down Expand Up @@ -528,7 +528,7 @@ protected void fillBlockIndexInfoDetails(long numberOfRows, String filePath,
org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex blockletIndex =
new org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex(btree, minmax);
BlockIndexInfo blockIndexInfo =
new BlockIndexInfo(numberOfRows, filePath, currentPosition, blockletIndex);
new BlockIndexInfo(numberOfRows, carbonDataFileName, currentPosition, blockletIndex);
blockIndexInfoList.add(blockIndexInfo);
}

Expand Down

0 comments on commit 84477cc

Please sign in to comment.