After generating hive table based on AWS S3, there's sometime that it will suffer from eventual consistency problem from S3, with the following error complains when trying to alter current table rename to another one or select from this table:
org.apache.hadoop.hive.ql.metadata.HiveException: Unable to alter table. Alter Table operation for db_name.tbl_name failed to move data due to: 'com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.s3.model.AmazonS3Exception: Not Found (Service: Amazon S3; Status Code: 404; Error Code: 404 Not Found; Request ID: 1BAD9D1409E5AE00), S3 Extended Request ID: tPOcJz0iymDMQLq2Ucgzbxc2BG8A7xWARyg+E1cf27HLoTE/LwFiNKz/DcVzumtFytZo3ircOWI=' See hive log file for details.;], stacktrace=[org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to alter table. Alter Table operation for db_name.tbl_name failed to move data due to: 'com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.s3.model.AmazonS3Exception: Not Found (Service: Amazon S3; Status Code: 404; Error Code: 404 Not Found; Request ID: 1BAD9D1409E5AE00), S3 Extended Request ID: tPOcJz0iymxxxxxxxcgzbxc2BG8A7xWARyg+E1cf27HLoTE/LwFiNKz/DcVzumtFytZo3ircOWI=' See hive log file for details.;
at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:98)
at org.apache.spark.sql.hive.HiveExternalCatalog.renameTable(HiveExternalCatalog.scala:460)
at org.apache.spark.sql.catalyst.catalog.SessionCatalog.renameTable(SessionCatalog.scala:495)
at org.apache.spark.sql.execution.command.AlterTableRenameCommand.run(tables.scala:159)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
After some testing, there's a way to mitigate this phenomenon remarkably by constraining the partition number when persisting to the table.
Occasionally, I explicitly set spark.sql.shuffle.partitions=2000
, which by default is 200, in order to solve imbalance of partition key issue. After this setting, it appears that more tables will suffer from this s3 eventual consistency issue from then on. Empirically, it could be caused by having too much small files (2000, in current case) writing to S3 simultaneously which will cause it more likely to suffering from long-time eventual consistency problem. so I try to coalesce
DataFrame before writing to table as below and this time, it seems all good now.
val targetDf = session.sql(sql).coalesce(25)
targetDf
.write.mode(SaveMode.Overwrite)
.partitionBy(partitionKey)
.saveAsTable(tableFullName)
The actual time and effort took to create this wonderful article were really great and would like to read this blog regularly to get more updates...
ReplyDeleteSQL Server Training | SQL Server Online Training
Thanks for the Great article. To know more stuff like this please go through the below websites
ReplyDeleteBEST SQL TRAINING
Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
ReplyDeleteSCCM Online Training
SCOM Online Training
Selenium Online Training
QuickBooks Enterprise at comfort of your house. We understand your growing business need and that's the key reason why we provide simply the QuickBooks Enterprise Support Phone Number We make sure to give worth of every penny
ReplyDeleteIntuit QuickBooks Support Number accords assistance to the QuickBooks users’ worldwide. The support team can be reached through various modes such as: phone support, email support, live chat, FAQ, QuickBooks community etc. Solving the Quickbooks related problems and issue Remotely .
ReplyDeleteLet us show you in partitioning all of the QuickBooks errors by dialing the QuickBooks Support Phone Number and QuickBooks Support Number for any technical problem that you’re facing whereas victimization the code.
ReplyDeleteA group of QuickBooks Tech Support Phone Number dedicated professionals is invariably accessible to suit your needs so as to arranged all of your problems in an attempt that you’ll be able to do your projects while not hampering the productivity.
ReplyDeleteThe support specialist will identify the problem. The deep real cause is likely to be found out. All the clients are extremely satisfied with QuickBooks support Phone Number.
ReplyDeleteQuickBooks Enterprise support Phone Number Is A Software Platform On Which A User Can Manage Different Financial Needs Of An Enterprise Such As Payroll Management, Accounts Management, Inventory And Many More.
ReplyDeleteQuickBooks Customer Support Number total package to create you clear of Financial accounting and back office worries any time to make sure you concentrate on your own expert area and yield potential development in business.
ReplyDeleteAre you fed up with the nagging QuickBooks Enterprise Support Phone Number issues and looking for some technical assistance in QuickBooks Enterprise?
ReplyDeleteto begin with, a company can simply survive if it's making adequate profits to smoothly run the operations associated with work. Our QuickBooks Support Number team will really show you in telling you about the profit projections in QuickBooks.
ReplyDeleteQuickBooks Support executives are experienced, talented, hardworking an efficient. They put their hundred percent efforts and then make certain to have you avail their 24*7 assistance. Give us a call at our toll-free number or drop us a mail.
ReplyDeleteWe are going to also provide you with the figure within your budget which you are able to be in the future from now. This is only possible with Intuit QuickBook Support
ReplyDeleteQuickBooks Payroll Customer Support Number enables an individual to process paychecks, calculate payroll taxes, and in addition generate reports to make use of for accounting purposes or to create federal and state tax forms for filing. Users must keep themselves aware of the updates and downloads of QuickBooks which will make sure that they stay as much as date because of the current tax tables. Advanced users of QuickBooks payroll obtain the privilege associated with the added step of processing payroll tax forms on schedule. QuickBooks does the element of preparing the proper execution whereas the business enterprise owner must review, print and send all the tax forms on time.
ReplyDeleteAll the above has a specific use. People working together with accounts, transaction, banking transaction need QuickBooks Support Phone Number service. Some people are employing excel sheets for some calculations.
ReplyDeleteAre you wandering every now and then so that you can look for the best way to run the QuickBooks Enterprise software for your needs? We now have come with a lot of permanent approaches to fix your problems in a few seconds with a perfect QuickBooks Enterprise customer care. Just dial our QuickBooks Enterprise Number USA to contact QuickBooks enterprise help team anytime & anywhere.
ReplyDeleteQuickBooks Tech Support Number going to be enough time for QuickBooks support help. The traders can’t earn money. But, we've been here to guide a forecast.
ReplyDeleteThe attributes of QuickBooks Customer Support Number makes users amaze and but sometimes feel bad if the reference to the Quickbooks happens to be lost . It is frequent issues with the application are such as for instance: QB SYNC problem , errors within the transaction report , improper functioning of payroll system errors while doing the installation.
ReplyDeletePhone Number for QuickBooks Payroll Support
ReplyDeleteSo so now you are becoming well tuned directly into advantages of QuickBooks online payroll in your business accounting but because this premium software contains advanced functions that will help you and your accounting task to accomplish, so you could face some technical errors when using the QuickBooks payroll solution. In that case, Quickbooks online payroll support number provides 24/7 make it possible to our customer. Only you must do is make a person call at our toll-free QuickBooks Payroll tech support number . You could get resolve most of the major issues include installations problem, data access issue, printing related issue, software setup, server not responding error etc with this QuickBooks payroll support team.
It is easy to find support from the QuickBooks Enterprise Tech Support Phone Number team through by calling their QuickBooks Enterprise Service Phone Number. By reaching out to the QuickBooks Enterprise Support Number it is possible to get immediate assistance through a phone.
ReplyDeleteTo acquire a mistake free accounting experience, our QuickBooks Support team is here now to permit you focus on your organization growth in host to troubleshooting the accounting errors.
ReplyDeleteWe make sure that your calls don't get bounced. Should your calls are failing woefully to connect with us at quickbook support contact number, then you can certainly also join all of us by dropping a contact without feeling shy. Our QuickBooks Tech Support Phone Number will continue to be available even in the wee hours.
ReplyDeleteQuickBooks was created to meet your every accounting needs and requirement with a fantastic ease. This software grows and your business and perfectly adapts with changing business environment. Everbody knows there are always two sides to a coin and QuickBooks is not any different. This software also throws some errors in the end. Sometimes it becomes quite difficult to understand this can be with this specific error code or message. If that's the case you ought to call our QuickBooks Support Number to own in touch with our technical experts in order to search for the fix of error instantly.
ReplyDeleteyou need to be worried about the product quality and satisfaction rate of customer support channel at QuickBooks Technical Support contact number. Without a doubt some unmatched service of our QuickBooks Support Phone Number channel which will surly help you answer the questions puzzling in your thoughts.
ReplyDeleteLet’s see some awesome features that could have caused it is so popular. If you are also a QuickBooks user and wants to get more information concerning this software you may read the QuickBooks Enterprise Support Number.
ReplyDeleteNeed not worry if you are stuck with QuickBooks issue in midnight as our technical specialists at QuickBooks Support Phone Number is present twenty-four hours on a daily basis to serve you together with the best optimal solution very quickly.
ReplyDeleteNowadays accounting has exploded in order to become everyone’s cup of tea and that’s only become possible because due to the birth of QuickBooks Support Number accounting software. We possess the best plus the most convenient means to fix enhance your productivity by solving every issue you face with all the software.
ReplyDeleteIntuit QuickBooks Support helps to make the process far more convenient and hassle free by solving your any QuickBooks issues and error in only an individual call. We offer excellent tech support team services once we have the highly experienced and certified professionals to provide you the gilt-edge technical support services like.
ReplyDeleteIntuit has developed these items by continuing to keep contractor’s needs in your mind; also, cared for the software solution in line with the company size. At the moment, QuickBooks Payroll Support Phone Number software covers significantly more than 80% of the small-business market share.
ReplyDeleteQuickBooks, a credit card applicatoin solution that will be developed in such a means that one can manage payroll, inventory, sales and every other need of small businesses. Each QuickBooks software solution is developed based on different industries and their demands to be able to seamlessly manage all of your business finance at any time plus in one go. Need not worry if you should be stuck with QuickBooks issue in midnight as our technical specialists at QuickBooks Technical Support Number is present twenty-four hours a day to serve you along with the best optimal solution very quickly.
ReplyDeleteThis could lead an individual to create their device and troubleshoot the HP Printer not working issue. How to Connect HP Printer Support Number to Laptop, Computer or Wi-Fi?
ReplyDeleteQuickBooks Enterprise Support Phone Number has almost eliminated the conventional accounting process. Along with an array of tools and automations, it provides a wide range of industry verticals with specialized reporting formats and tools.
ReplyDelete
ReplyDeleteTax Submissions: Tax submissions have become quite a straight road with Assisted QuickBooks Payroll Technical Support Number Version. The application will automatically fill the form and submit the tax depending on rules and regulations of federal and state law.
Tax Calculations: with the aid of this, the tax calculations have grown to be a cup of tea. Tax submission has now become a click away. Direct deposit: QuickBooks Payroll Support Phone Number gives the advantageous asset of direct deposits to your users.
ReplyDeleteIt promotes easy and fast calculation of Payrolls: In the event that you run a business and that too a huge one, you can’t manage to commit mistake in QuickBooks Support Phone Number calculation and that is where QB Payroll plays its part.
ReplyDeleteIntuit QuickBooks Support is assisted by our customer support representatives who answer your call instantly and resolve all your valuable issues at that moment. It really is a backing portal that authenticates the users of QuickBooks to perform its services in a user-friendly manner.
ReplyDeletePayroll management is truly an essential part these days. Every organization has its own employees. Employers have to manage their pay. The yearly medical benefit is important. The employer has to allocate. But, accomplishing this manually will need the full time. Strive for QuickBooks Payroll Support Number.
ReplyDeleteOur dedicated QuickBooks Support Number team is sure with you. These are typically surely working at any hour to aid and make suggestions if you come across any QuickBooks error/s. Our QuickBooks Support team surely have in-depth knowledge in connection with issues and complications of QuickBooks.
ReplyDeletethis is the fantastic blog i have read cyber security online training india
ReplyDeleteHere we list some definitions for the words found in your error, so as to allow you to understand your condition. This really is a work in progress, so sometimes we may define the term incorrectly, so feel free to skip this section! If you would like to learn How To Fix Quickbooks Error 9999, you can continue reading this blog.
ReplyDeleteIt is very good and useful for students and developer .Learned a lot of new things from your post!Good creation ,thanks for give a good information at Informatica.
ReplyDeleteSalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
Salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training
Hii, Thank you so much for this blog, I started to learn AWS training online it is definitely very helpful for me. Thank you for this informative blog.
ReplyDeleteNice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
ReplyDeleteartificial intelligence internship | best final year projects for cse | internship certificate online | internship for mba finance students | internship meaning in tamil
it is usefull post thanking you
ReplyDeleteAzure Data Factory course in Ameerpet,Azure
Data Engineer Training Online Hyderabad
,azure training in hyderabad ameerpe
t,Azure Data Factory online Training in Hyderabad,
Microsoft Azure Data Factory in hyderabad