Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6768/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2406 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5614/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5601/ --- |
In reply to this post by qiuchenjian-2
Github user brijoobopanna commented on the issue:
https://github.com/apache/carbondata/pull/2406 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6786/ --- |
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2406#discussion_r200239066 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/filesystem/S3CarbonFile.java --- @@ -0,0 +1,146 @@ +/* + * 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.core.datastore.filesystem; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.carbondata.common.logging.LogService; +import org.apache.carbondata.common.logging.LogServiceFactory; +import org.apache.carbondata.core.constants.CarbonCommonConstants; +import org.apache.carbondata.core.datastore.impl.FileFactory; +import org.apache.carbondata.core.util.CarbonUtil; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.LocatedFileStatus; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.fs.RemoteIterator; + +public class S3CarbonFile extends HDFSCarbonFile { + + private static final LogService LOGGER = + LogServiceFactory.getLogService(HDFSCarbonFile.class.getName()); + + public S3CarbonFile(String filePath) { + super(filePath); + } + + public S3CarbonFile(String filePath, Configuration hadoopConf) { + super(filePath, hadoopConf); + } + + public S3CarbonFile(Path path) { + super(path); + } + + public S3CarbonFile(Path path, Configuration hadoopConf) { + super(path, hadoopConf); + } + + public S3CarbonFile(FileStatus fileStatus) { + super(fileStatus); + } + + /** + TODO: The current implementation of renameForce is not correct as it deletes the destination + object and then performs rename(copy). + If the copy fails then there is not way to recover the old file. + This can happen when tablestatus.write is renamed to tablestatus. + One solution can be to read the content and rewrite the file as write with the same name + will overwrite the file by default. Need to discuss. + Refer CARBONDATA-2670 for tracking this. + */ + @Override + public boolean renameForce(String changetoName) { + FileSystem fs; + try { + deleteFile(changetoName, FileFactory.getFileType(changetoName)); + fs = fileStatus.getPath().getFileSystem(hadoopConf); + return fs.rename(fileStatus.getPath(), new Path(changetoName)); + } catch (IOException e) { + LOGGER.error("Exception occured: " + e.getMessage()); + return false; + } + } + + @Override + public DataOutputStream getDataOutputStreamUsingAppend(String path, FileFactory.FileType fileType) + throws IOException { + return getDataOutputStream(path, fileType, CarbonCommonConstants.BYTEBUFFER_SIZE, true); + } + + @Override public DataOutputStream getDataOutputStream(String path, FileFactory.FileType fileType, + int bufferSize, boolean append) throws IOException { + Path pt = new Path(path); + FileSystem fileSystem = pt.getFileSystem(FileFactory.getConfiguration()); + FSDataOutputStream stream; + if (append) { + // append to a file only if file already exists else file not found + // exception will be thrown by hdfs + if (CarbonUtil.isFileExists(path)) { + DataInputStream dataInputStream = fileSystem.open(pt); + int count = dataInputStream.available(); + // create buffer + byte[] byteStreamBuffer = new byte[count]; + int bytesRead = dataInputStream.read(byteStreamBuffer); + stream = fileSystem.create(pt, true, bufferSize); + stream.write(byteStreamBuffer, 0, bytesRead); + } else { + stream = fileSystem.create(pt, true, bufferSize); + } + } else { + stream = fileSystem.create(pt, true, bufferSize); + } + return stream; + } + + @Override + public CarbonFile getParentFile() { + Path parent = fileStatus.getPath().getParent(); + return null == parent ? null : new S3CarbonFile(parent, hadoopConf); + } + + @Override + protected CarbonFile[] getFiles(FileStatus[] listStatus) { + if (listStatus == null) { + return new CarbonFile[0]; + } + CarbonFile[] files = new CarbonFile[listStatus.length]; + for (int i = 0; i < files.length; i++) { + files[i] = new S3CarbonFile(listStatus[i]); + } + return files; + } + + @Override + protected List<CarbonFile> getFiles(RemoteIterator<LocatedFileStatus> listStatus) + throws IOException { + List<CarbonFile> carbonFiles = new ArrayList<>(); + while (listStatus.hasNext()) { + Path filePath = listStatus.next().getPath(); + carbonFiles.add(new S3CarbonFile(filePath)); --- End diff -- CreateFile add overidden method so that, need not copy logic --- |
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2406#discussion_r200245816 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala --- @@ -386,7 +386,8 @@ class CarbonFileMetastore extends CarbonMetaStore { val schemaMetadataPath = CarbonTablePath.getFolderContainingFile(schemaFilePath) val fileType = FileFactory.getFileType(schemaMetadataPath) if (!FileFactory.isFileExist(schemaMetadataPath, fileType)) { - val isDirCreated = FileFactory.mkdirs(schemaMetadataPath, fileType) + val isDirCreated = FileFactory --- End diff -- move this to S3 support PR --- |
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2406#discussion_r200246477 --- Diff: processing/src/test/java/org/apache/carbondata/lcm/locks/LocalFileLockTest.java --- @@ -68,4 +80,18 @@ Assert.assertTrue(localLock2.unlock()); } + @Test public void testConfigurablePathForLock() throws Exception { + Field f = secretClass.getDeclaredField("lockPath"); + f.setAccessible(true); + f.set(secretClass, rootPath + "/target/"); + AbsoluteTableIdentifier absoluteTableIdentifier = AbsoluteTableIdentifier + .from(CarbonProperties.getInstance().getProperty("carbon.storelocation"), "databaseName", + "tableName", "1"); --- End diff -- reset the lockpath in testcase finally clause --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5612/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6805/ --- |
In reply to this post by qiuchenjian-2
Github user brijoobopanna commented on the issue:
https://github.com/apache/carbondata/pull/2406 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5617/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6817/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6821/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6826/ --- |
In reply to this post by qiuchenjian-2
Github user kunal642 commented on the issue:
https://github.com/apache/carbondata/pull/2406 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6829/ --- |
In reply to this post by qiuchenjian-2
Github user kunal642 commented on the issue:
https://github.com/apache/carbondata/pull/2406 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2406 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6831/ --- |
In reply to this post by qiuchenjian-2
Github user kunal642 commented on the issue:
https://github.com/apache/carbondata/pull/2406 retest this please --- |
Free forum by Nabble | Edit this page |