在LINUX上使用Camel 2.10挂载文件夹文件(Mount folder file handling using Camel 2.10 on LINUX)
我正在使用Camel 2.10版本,我们正面临这个问题。 JBoss Fuse 6.0在RHEL上运行,我们在服务器上安装了一个Windows共享文件夹linux文件夹是
/mnt/sharedwin
。现在我们正在使用文件组件处理此文件夹中的文件,如下所示。
from端点如下
file:/mnt/sharedwin/Current?preMove=/opt/jboss/fuse/data/target/processing&move=archive/$simple{date:now:yyyyMMdd}/$simple{file:name}&moveFailed=errorFile/$simple{date:now:yyyyMMdd}/$simple{file:name}
运行应用程序时,我们将获得以下WARN消息,并且文件未被移动到存档文件夹。
引起:java.io.IOException:将文件从:/mnt/sharedwin/Current/XYZ.csv重命名为:/opt/jboss/fuse/data/target/processing/XYZ.csv失败,因为无法从文件中删除:/ mnt复制成功后/sharedwin/Current/XYZ.csv
我在文件URL中遗漏了一些参数,请帮忙。
I am using Camel 2.10 version inwhich we are facing this issue. The JBoss Fuse 6.0 is running on the RHEL and we have mounted a Windows shared folder on the server linux folder is
/mnt/sharedwin
.Now we are processing file from this folder using file component as below.
The from endpoint is as below
file:/mnt/sharedwin/Current?preMove=/opt/jboss/fuse/data/target/processing&move=archive/$simple{date:now:yyyyMMdd}/$simple{file:name}&moveFailed=errorFile/$simple{date:now:yyyyMMdd}/$simple{file:name}
When running the application we are getting following WARN msg and file are not getting moved to archive folder.
Caused by: java.io.IOException: Renaming file from: /mnt/sharedwin/Current/XYZ.csv to: /opt/jboss/fuse/data/target/processing/XYZ.csv failed due cannot delete from file: /mnt/sharedwin/Current/XYZ.csv after copy succeeded
Am I missing some parameters in file URL, please help.
原文:https://stackoverflow.com/questions/27351680
最满意答案
案例折叠算法有几个版本(并且算法可以针对不同的语言/上下文进行自定义),但是当使用Unicode标准中指定的算法时:任何在
CaseFolding.txt
中具有映射的代码点(至少具有C
状态,以及S
或F
)不能出现在大小写折叠的字符串中。对于真正不区分大小写的比较,具有NFKC规范化形式或
Default_Ignorable_Code_Point
属性的字符也将被替换,并且不会出现。 这是在DerivedNormalizationProps.txt
具有NFKC_Casefold
映射的字符集 - 总共10,146个代码点。There are several versions of the case folding algorithm (and the algorithm is customisable for different languages/contexts), but when using the algorithm as specified in the Unicode Standard: any code point that has a mapping in
CaseFolding.txt
(with at least aC
status, and eitherS
orF
) cannot appear in a case-folded string.For true case-insensitive comparisons, characters that have an NFKC normalisation form or the
Default_Ignorable_Code_Point
property will also be replaced and cannot appear. This is the set of characters with anNFKC_Casefold
mapping inDerivedNormalizationProps.txt
-- a total of 10,146 code points.
相关问答
更多-
Elasticsearch对Unicode字符使用错误的Case Folding(Elasticsearch uses wrong Case Folding for Unicode Characters)[2019-09-29]
您应该尝试在您的设置中使用土耳其语语言分析器 。 { "mappings": { "names": { "properties": { "name": { "type": "string", "analyzer": "turkish" } } } } } 正如您在实现细节中所看到的,它还定义了turkish_lowercase因此我想它会为您解决您的问题。 如果您不想要土耳其分 ... -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
unicode或unicode(to unicode or not to unicode)[2022-02-10]
尽可能使用Unicode将使您的生活更轻松。 注册表本身包含Unicode并在使用ReqQueryValueExA时动态转换为MBCS,为什么要进行不需要的转换? 从UTF-16转换为UTF-8可能对通过网络传输的信息有意义,但如果您控制连接的两端则没有必要。 Using Unicode whenever possible will make your life easier. The registry contains Unicode natively and converts to MBCS on th ... -
案例折叠算法有几个版本(并且算法可以针对不同的语言/上下文进行自定义),但是当使用Unicode标准中指定的算法时:任何在CaseFolding.txt中具有映射的代码点(至少具有C状态,以及S或F )不能出现在大小写折叠的字符串中。 对于真正不区分大小写的比较,具有NFKC规范化形式或Default_Ignorable_Code_Point属性的字符也将被替换,并且不会出现。 这是在DerivedNormalizationProps.txt具有NFKC_Casefold映射的字符集 - 总共10,146个 ...
-
在字符串中追加unicode代码点及其相应的字形(Append unicode code points with their corresponding glyphs in a string)[2023-07-19]
re.sub可以采取替换功能。 这里我使用一个lambda函数。 它用正则表达式的每个匹配的匹配对象调用。 m.group(0)是整个匹配, m.group(1)是与四个十六进制数字匹配的括号表达式。 import re s = 'U+06A4, U+06A7, U+06A8, U+06A9, U+06AF' s = re.sub(r'U\+([0-9A-F]{4})',lambda m: m.group(0)+' '+chr(int(m.group(1),16)),s) print(s) 输出: U+0 ... -
对的,这是可能的。 根据微软的文档,.NET 字符串是简单的 String对象是表示字符串的System.Char对象的顺序集合。 而.NET Char 将字符表示为UTF-16代码单元。 总之,这意味着.NET字符串只是一系列UTF-16代码单元,无论它们是否符合Unicode标准的有效字符串。 有很多方法可以发生,我能想到的一些更常见的方式是: 非UTF-16字节流被错误地放入String对象而没有正确转换。 一个String对象在代理对之间被分割。 有人故意包含这样的字符串来测试系统的健壮性。 因此, ...
-
您需要为其指定flags : >>> re.sub(r'\w+','x', line, flags=re.UNICODE) u'x x.' 请注意,在re.sub(pattern, repl, string, count=0, flags=0)函数中,第四个参数是count ! You need to specify the flags for it : >>> re.sub(r'\w+','x', line, flags=re.UNICODE) u'x x.' Note that in re.sub( ...
-
将php中的任何字符串或字符转换为unicode代码点(convert any string or a character in php to unicode code points)[2022-10-11]
使用此功能 function Unicode_decode($text) { return implode(unpack('H*', iconv("UTF-8", "UCS-4BE", $text))); } 如果你想让U+0000使用这个: for ($i=0; $i < strlen($word); $i++) { $wordConvert = Unicode_decode($word[$i]); $result .= "U+" . substr($wordConvert, ... -
管理自己解决这个问题。 使用mb_convert_encoding转换为HTML实体并从那里转换。 Managed to solve this myself. Used mb_convert_encoding to convert to HTML entities and converted from there.
-
所以,问题是我的irssi有点过时,错误已经修复,实际上很容易实现。 对于任何想要做同样事情的人来说,你需要这样的东西: my %hash = ( 0x1f600 => ':)', # add smileys to taste here ); sub transform ($$$$$$) { my ($server, $msg, $nick, $address, $target) = @_; my $transformed = ''; $msg = decode( ...