每个文件夹无法合并超过 300 个 pdf 文件使用的库是 gdpicture

如何解决每个文件夹无法合并超过 300 个 pdf 文件使用的库是 gdpicture

我正在使用gdpicture库删除空白tiff文件,将tif转换为pdf,旋转pdf文件,最后合并pdf文件。 我拥有使用最新版本的最终许可证。 当我使用 270 个文件时,我能够成功执行上述功能。 当文件大小增加到每个文件夹 300 个文件时。 只有 1 个 pdf 文件成功合并为多页文件,其余的则没有。 只有当每个文件夹的 pdf 文件超过 270 时,我才会收到错误合并文档状态访问被拒绝,我用 270 和 298 测试它在 298 时失败。 我是否遗漏了要由 回答的这个问题的任何关键信息?

using GdPicture14;
using Microsoft.VisualBasic.FileIO;
using System;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
using MessageBox = System.Windows.Forms.MessageBox;
using Path = System.IO.Path;
using SearchOption = System.IO.SearchOption;

namespace TanOCR
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {

        //private GdPicturePDF oPDF = null;
        public MainWindow()
        {
            try
            {
                InitializeComponent();

                cbPDFConform.Items.Clear();
                for (int i = 0; i < Enum.GetNames(typeof(PdfConformance)).Length - 1; i++)
                {
                    ComboBoxItem cbi = new ComboBoxItem();
                    cbi.Content = Enum.GetName(typeof(PdfConformance),(PdfConformance)i);
                    PdfConformance test = (PdfConformance)i;
                    cbi.Tag = (PdfConformance)i;
                    cbPDFConform.Items.Add(cbi);
                }
                cbPDFConform.SelectedIndex = 0;

                cbProcessorCount.Items.Clear();
                for (int i = 1; i <= Environment.ProcessorCount; i++)
                {
                    cbProcessorCount.Items.Add(i.ToString());
                    if (Environment.ProcessorCount / 2 == i) { cbProcessorCount.SelectedIndex = i - 1; }
                }

                string configpath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,@"path.txt");

                string[] configfile = File.ReadAllLines(configpath);
                if (configfile.Length > 1)
                {
                    ip.Text = configfile[0];
                    op.Text = configfile[1];
                    ex_tb.Text = configfile[2];
                    Protb.Text = configfile[3];
                }
            }
            catch (Exception e1)
            {
                MessageBox.Show("e1" + e1.Message);
            }
        }



        public static string browseFolder()
        {
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
            System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();

            System.Windows.Forms.DialogResult result = fbd.ShowDialog();

            string path = string.Empty;

            // Get the selected file name and display in a TextBox 
            if (result == (System.Windows.Forms.DialogResult)MessageBoxResult.OK)
            {
                // Open document 
                path = fbd.SelectedPath;

                if (path[path.Length - 1] != '\\')
                {
                    path = path + "\\";
                }
            }
            return path;
        }


        private string ConvertTIFFTOPDFyes2()//required
        {

            System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke((Action)(() =>
            {
                var watch = new System.Diagnostics.Stopwatch();

                watch.Start();

                PdfConformance optPDFConform = PdfConformance.Unknown;

                var all_dir = Directory.EnumerateFiles(op.Text,"*.*",SearchOption.AllDirectories)
                .Where(s => s.EndsWith(".tiff") || s.EndsWith(".tif")).ToArray();


                //string[] all_dir = Directory.GetFiles(Protb.Text,SearchOption.AllDirectories);


                for (int ad = 0; ad < all_dir.Length; ad++)
                {
                    string fd = Path.GetDirectoryName(all_dir[ad]);

                    string op_path = fd.Replace(op.Text,Protb.Text);

                    string getextension = Path.GetExtension(all_dir[ad]);
                    string dict = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,"Redist","OCR");
                    string dirName = Path.GetFileName(Path.GetDirectoryName(all_dir[ad]));
                    string outputPath = (new FileInfo(all_dir[ad]).Directory.FullName).Replace(op.Text,Protb.Text);


                    fd = Path.GetDirectoryName(all_dir[ad]);
                    string fn = Path.GetFileNameWithoutExtension(all_dir[ad]);
                    //op_path = fd.Replace(op.Text,Protb.Text);
                    string filen = Path.Combine(outputPath,fn + ".pdf");

                    string savefile = Path.Combine(op_path,filen);
                    //string dest = Path.Combine(outputPath,dirName);
                    using (GdPictureDocumentConverter oConverter = new GdPictureDocumentConverter())
                    {
                        GdPictureStatus status = oConverter.LoadFromFile(all_dir[ad],GdPicture14.DocumentFormat.DocumentFormatTIFF);
                        if (status == GdPictureStatus.OK)
                        {
                            if (!Directory.Exists(op_path))
                            {
                                Directory.CreateDirectory(op_path);
                            }

                            optPDFConform = (PdfConformance)((ComboBoxItem)cbPDFConform.SelectedItem).Tag;

                            status = oConverter.SaveAsPDF(savefile,optPDFConform);
                            if (status == GdPictureStatus.OK)
                            {

                            }
                            else
                            {
                                MessageBox.Show("The file has failed to save. Status: " + status.ToString(),"TIFF to PDF Example",MessageBoxButtons.OK,MessageBoxIcon.Error);
                            }
                        }
                        else
                        {
                            MessageBox.Show("The file has failed to load. Status: " + status.ToString(),MessageBoxIcon.Error);
                        }
                    }

                }
                watch.Stop();


                logtb.AppendText(Environment.NewLine + "tiff to pdf " + watch.ElapsedMilliseconds.ToString());

                var watchDel = new System.Diagnostics.Stopwatch();

                watchDel.Start();

                Directory.Delete(ip.Text,true);
                Directory.CreateDirectory(ip.Text);
                FileSystem.CopyDirectory(op.Text,ip.Text,UIOption.AllDialogs);
                Directory.Delete(op.Text,true);
                Directory.CreateDirectory(op.Text);

                watchDel.Stop();


                logtb.AppendText(Environment.NewLine + "delete copy " + watchDel.ElapsedMilliseconds.ToString());
                //clearFolder(op.Text);
                OcrPDFPages_4();
                //clearFolder(Protb.Text);testing withoOcrPDFPages_4ut merge
            }));
            return string.Empty;
        }

        private string deleteblanktiff1yes()//required
        {

            System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke((Action)(() =>
            {

                var watch = new System.Diagnostics.Stopwatch();

                watch.Start();


                var all_dir = Directory.EnumerateFiles(ip.Text,SearchOption.AllDirectories)
            .Where(s => s.EndsWith(".tiff") || s.EndsWith(".tif")).ToArray();


                for (int ad = 0; ad < all_dir.Length; ad++)
                {


                    string getextension = Path.GetExtension(all_dir[ad]);
                    string fd = Path.GetDirectoryName(all_dir[ad]);

                    string op_path = fd.Replace(ip.Text,op.Text);

                    string dict = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,"OCR");
                    string dirName = Path.GetFileName(Path.GetDirectoryName(all_dir[ad]));
                    string outputPath = (new FileInfo(all_dir[ad]).Directory.FullName).Replace(ip.Text,op.Text);


                    fd = Path.GetDirectoryName(all_dir[ad]);
                    string fn = Path.GetFileNameWithoutExtension(all_dir[ad]);
                    op_path = fd.Replace(ip.Text,op.Text);
                    string filen = Path.Combine(outputPath,fn + getextension);

                    string savefile = Path.Combine(op_path,filen);


                    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
                    {
                        if (!Directory.Exists(op_path))
                        {
                            Directory.CreateDirectory(op_path);
                        }

                        int imageID = gdpictureImaging.TiffCreateMultiPageFromFile_2(all_dir[ad],true);
                        int pageCount = gdpictureImaging.TiffGetPageCount(imageID);
                        int pageNo = 1;
                        while (pageNo <= pageCount)
                        {
                            gdpictureImaging.TiffSelectPage(imageID,pageNo);
                            if (gdpictureImaging.IsBlank(imageID))
                            {
                                gdpictureImaging.TiffDeletePage(imageID,pageNo);
                                pageCount--;
                            }
                            else
                            {
                                pageNo++;
                            }
                        }
                        gdpictureImaging.SaveAsTIFF(imageID,savefile,TiffCompression.TiffCompressionAUTO);

                        gdpictureImaging.ReleaseGdPictureImage(imageID);
                    }

                }

                watch.Stop();


                logtb.AppendText("deleting blanks pages " + watch.ElapsedMilliseconds.ToString());



                ConvertTIFFTOPDFyes2();

            }));
            return op.Text;
        }


        private string OcrPDFPages_4()
        {

            System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke((Action)(() =>
            {

                var watch = new System.Diagnostics.Stopwatch();

                watch.Start();

                var all_dir = Directory.EnumerateFiles(Protb.Text,SearchOption.AllDirectories)
           .Where(s => s.EndsWith(".pdf") || s.EndsWith(".PDF")).ToArray();

                for (int ad = 0; ad < all_dir.Length; ad++)
                {

                    string fd = Path.GetDirectoryName(all_dir[ad]);

                    string op_path = fd.Replace(Protb.Text,ex_tb.Text);

                    string dict = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,"OCR");
                    string dirName = Path.GetFileName(Path.GetDirectoryName(all_dir[ad]));

                    string getextension = Path.GetExtension(all_dir[ad]);
                    fd = Path.GetDirectoryName(all_dir[ad]);
                    string fn = Path.GetFileNameWithoutExtension(all_dir[ad]);
                    op_path = fd.Replace(Protb.Text,ex_tb.Text);
                    string filen = Path.Combine(op_path,filen);
                    using (GdPicturePDF oGdPicturePDF = new GdPicturePDF())
                    {

                        if (oGdPicturePDF.LoadFromFile(all_dir[ad],false) == GdPictureStatus.OK)
                        {
                            if (!Directory.Exists(op_path))
                            {
                                Directory.CreateDirectory(op_path);
                            }


                            if (oGdPicturePDF.OcrPages_4("*",int.Parse(cbProcessorCount.SelectedItem.ToString()),"eng",dict,"",250,OCRMode.FavorSpeed,1000,true) == GdPictureStatus.OK)
                            {

                                if (oGdPicturePDF.SaveToFile(savefile) == GdPictureStatus.OK)

                                {
                                }

                                else
                                    MessageBox.Show("The resulting document can't be saved. Status: " + oGdPicturePDF.GetStat().ToString());
                            }
                            else
                                MessageBox.Show("The OCR process has failed. Status: " + oGdPicturePDF.GetStat().ToString());
                            oGdPicturePDF.CloseDocument();
                        }
                        else
                            MessageBox.Show("The file can't be loaded. Status: " + oGdPicturePDF.GetStat().ToString());
                    }

                }

                watch.Stop();

                TimeSpan ts = watch.Elapsed;

                ts.ToString("mm\\:ss\\.ff");
                logtb.AppendText(Environment.NewLine + "OCR pages " + ts);

                Directory.Delete(Protb.Text,true);
                Directory.CreateDirectory(Protb.Text);

                pageorientation();

            }));


            return string.Empty;
        }

        private string pageorientation()
        {

            System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke((Action)(() =>
            {

                var watch = new System.Diagnostics.Stopwatch();

                watch.Start();


                var all_dir = Directory.EnumerateFiles(ex_tb.Text,SearchOption.AllDirectories)
            .Where(s => s.EndsWith(".pdf") || s.EndsWith(".PDF")).ToArray();
                //string[] all_dir = Directory.GetFiles(op.Text,SearchOption.AllDirectories);

                string op_path = string.Empty;
                for (int ad = 0; ad < all_dir.Length; ad++)
                {
                    string outputPath = (new FileInfo(all_dir[ad]).Directory.FullName).Replace(ex_tb.Text,Protb.Text);
                    string fn = Path.GetFileNameWithoutExtension(all_dir[ad]);
                    string getextension = Path.GetExtension(all_dir[ad]);

                    string fd = Path.GetDirectoryName(all_dir[ad]);
                    op_path = fd.Replace(ex_tb.Text,fn + getextension);
                    string savefile = Path.Combine(op_path,filen);

                    string destpath = savefile;

                    string filepath = all_dir[ad];
                    string dict = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,"OCR");
                    string DICT_PATH = dict; //Specify your path.
                    OCRLanguage LANG = OCRLanguage.English; //Specify your language.

                    string caption = "Example: GuessPageTextRotation";
                    GdPicturePDF oGdPicturePDF = new GdPicturePDF();
                    GdPictureStatus status = oGdPicturePDF.LoadFromFile(all_dir[ad],false);
                    if (status == GdPictureStatus.OK)
                    {

                        if (!Directory.Exists(op_path))
                        {
                            Directory.CreateDirectory(op_path);
                        }
                        int pageCount = oGdPicturePDF.GetPageCount();
                        status = oGdPicturePDF.GetStat();
                        if (status == GdPictureStatus.OK)
                        {
                            string message = null;
                            int page_text_rotation = 0;
                            for (int i = 1; i <= pageCount; i++)
                            {
                                oGdPicturePDF.SelectPage(i);

                                status = oGdPicturePDF.NormalizePage();
                                if (status == GdPictureStatus.OK)
                                {
                                    page_text_rotation = oGdPicturePDF.GuessPageTextRotation();
                                    status = oGdPicturePDF.GetStat();
                                    if (status == GdPictureStatus.OK)
                                    {
                                        { }
                                        //message = message + "text rotation: " + page_text_rotation.ToString();
                                        if (page_text_rotation > 0)
                                        {
                                            status = oGdPicturePDF.RotatePage(page_text_rotation);
                                            if (status == GdPictureStatus.OK)
                                            {
                                                //message = message + " :page has been rotated\n";
                                            }
                                            else
                                            {

                                                break;
                                            }
                                        }
                                        else
                                        {

                                        }
                                    }
                                }
                                else
                                {

                                    break;
                                }
                            }
                            if (status == GdPictureStatus.OK)
                            {
                                status = oGdPicturePDF.SaveToFile(savefile);
                                if (status == GdPictureStatus.OK)
                                { }
                                else
                                    message = message + "\nThe pages have been rotated successfully but the file can't be saved.";
                            }

                        }
                        else
                        {
                            MessageBox.Show("The GetPageCount() method has failed with the status: " + status.ToString(),caption);
                        }
                    }
                    else
                    {
                        MessageBox.Show("The file can't be loaded.",caption);
                    }
                    oGdPicturePDF.Dispose();
                }
                watch.Stop();
                logtb.AppendText(Environment.NewLine + "Rotating pages " + watch.ElapsedMilliseconds.ToString());

                if (MergeChk.IsChecked == true)
                {
                    merge();
                }
                else if (MergeChk.IsChecked == false)
                {

                    FileSystem.CopyDirectory(
           Protb.Text,op.Text,UIOption.AllDialogs);

                    Directory.Delete(Protb.Text,true);
                    Directory.CreateDirectory(Protb.Text);

                    FileSystem.CopyDirectory(
            ip.Text,Protb.Text,UIOption.AllDialogs);

                    Directory.Delete(ip.Text,true);
                    Directory.CreateDirectory(ip.Text);

                    Directory.Delete(ex_tb.Text,true);
                    Directory.CreateDirectory(ex_tb.Text);

                    MessageBox.Show("The OCRed pdf files are created at " + op.Text);
                }
            }));
            return string.Empty;
        }

        private void merge()
        {
            String saveToPath = String.Empty;
            try
            {
                using (StreamWriter sw = new StreamWriter(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,@"path.txt"),false))
                {
                    sw.WriteLine(ip.Text);
                    sw.WriteLine(op.Text);
                    sw.WriteLine(ex_tb.Text);
                    sw.WriteLine(Protb.Text);
                    sw.Close();
                }
            }
            catch (Exception tm1)
            {
                MessageBox.Show("(tm1)" + tm1.Message);
            }

            System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke((Action)(() =>
            {
                var watch = new System.Diagnostics.Stopwatch();

                watch.Start();
                var all_dir = Directory.EnumerateFiles(Protb.Text,SearchOption.AllDirectories)
          .Where(s => s.EndsWith(".pdf") || s.EndsWith(".PDF")).ToArray();


                for (int ad = 0; ad < all_dir.Length; ad++)
                {
                    string name = Path.GetDirectoryName(all_dir[ad]);
                    var folder = Directory.EnumerateFiles(name,SearchOption.AllDirectories).ToArray();

                    try
                    {

                        string dict = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,"OCR");
                        string dirName = Path.GetFileName(Path.GetDirectoryName(folder[0]));
                        name = Path.GetDirectoryName(folder[0]);
                        string outputPath = (new FileInfo(folder[0]).Directory.FullName).Replace(ip.Text,op.Text);
                        string ocrfolder = (new FileInfo(folder[0]).Directory.FullName).Replace(Protb.Text,op.Text);

                        string filen = Path.Combine(ocrfolder,dirName + ".pdf");

                        if (!Directory.Exists(ocrfolder))
                        {
                            Directory.CreateDirectory(ocrfolder);
                        }
                        int no = folder.Length;
                        string[] arPDF = new string[no];
                        using (GdPicturePDF oGdPicturePDF = new GdPicturePDF())
                        {
                            GdPictureStatus status = oGdPicturePDF.MergeDocuments(ref folder,filen);
                            if (status == GdPictureStatus.OK)
                            {
                            }
                            else
                            {
                                MessageBox.Show("The MergeDocuments() method has failed with the status: " + status.ToString());
                            }
                        }

                    }
                    catch (Exception e5)
                    {
                        MessageBox.Show("e5" + e5.Message);
                    }

                }

                watch.Stop();


                logtb.AppendText(Environment.NewLine + "merging pages " + watch.ElapsedMilliseconds.ToString());

                Directory.Delete(ex_tb.Text,true);
                Directory.CreateDirectory(ex_tb.Text);
                Directory.Delete(Protb.Text,true);
                Directory.CreateDirectory(Protb.Text);
                FileSystem.CopyDirectory(ip.Text,Protb.Text);
                Directory.Delete(ip.Text,true);
                Directory.CreateDirectory(ip.Text);

                MessageBox.Show("All documents have been successfully merged.");

            }));
        }




        private void inbtn_Click(object sender,RoutedEventArgs e)
        {
            try

            {
                ip.Text = browseFolder();
            }
            catch (Exception e7)
            {
                MessageBox.Show("e7" + e7.Message);
            }
        }

        private void obtn_Click(object sender,RoutedEventArgs e)
        {
            try
            {
                op.Text = browseFolder();
            }
            catch (Exception e8)
            {
                MessageBox.Show("e8" + e8.Message);
            }
        }

        private void start_btn_Click(object sender,RoutedEventArgs e)
        {
            try
            {

                using (StreamWriter sw = new StreamWriter(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,false))
                {
                    sw.WriteLine(ip.Text);
                    sw.WriteLine(op.Text);
                    sw.WriteLine(ex_tb.Text);
                    sw.WriteLine(Protb.Text);
                    sw.Close();

                    MessageBox.Show("path file is updated");
                }

                var watch = new System.Diagnostics.Stopwatch();

                watch.Start();
                deleteblanktiff1yes();

                watch.Stop();

                TimeSpan ts = watch.Elapsed;

                ts.ToString("mm\\:ss\\.ff");
                logtb.AppendText(Environment.NewLine + "full process " + ts);


            }
            catch (Exception e9)
            {
                MessageBox.Show("e9" + e9.Message);
            }
        }

        private void pro_btn_Click(object sender,RoutedEventArgs e)
        {
            try
            {
                Protb.Text = browseFolder();
            }
            catch (Exception e10)
            {
                MessageBox.Show("e10" + e10.Message);
            }
        }

        private void excep_Click(object sender,RoutedEventArgs e)
        {
            try
            {
                ex_tb.Text = browseFolder();
            }
            catch (Exception e11)
            {
                MessageBox.Show("e111" + e11.Message);
            }
        }
    }
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res