Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DataX
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
risk-feature
DataX
Commits
5ff6550d
Commit
5ff6550d
authored
Oct 29, 2020
by
刘洪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug:windows下换行符 ^M
parent
046a31e1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
70 deletions
+87
-70
HdfsHelper.java
...om/alibaba/datax/plugin/writer/hdfswriter/HdfsHelper.java
+78
-68
UnstructuredStorageWriterUtil.java
...ructuredstorage/writer/UnstructuredStorageWriterUtil.java
+8
-1
pom.xml
pom.xml
+1
-1
No files found.
hdfswriter/src/main/java/com/alibaba/datax/plugin/writer/hdfswriter/HdfsHelper.java
View file @
5ff6550d
This diff is collapsed.
Click to expand it.
plugin-unstructured-storage-util/src/main/java/com/alibaba/datax/plugin/unstructuredstorage/writer/UnstructuredStorageWriterUtil.java
View file @
5ff6550d
...
@@ -313,7 +313,7 @@ public class UnstructuredStorageWriterUtil {
...
@@ -313,7 +313,7 @@ public class UnstructuredStorageWriterUtil {
if
(
StringUtils
.
isBlank
(
data
))
{
if
(
StringUtils
.
isBlank
(
data
))
{
splitedRows
.
add
(
data
);
splitedRows
.
add
(
data
);
}
else
{
}
else
{
splitedRows
.
add
(
data
.
replaceAll
(
"\n"
,
"\\n"
).
replaceAll
(
"\t"
,
"\\t"
));
splitedRows
.
add
(
escape
(
data
));
}
}
}
else
{
}
else
{
if
(
null
!=
dateParse
)
{
if
(
null
!=
dateParse
)
{
...
@@ -336,4 +336,11 @@ public class UnstructuredStorageWriterUtil {
...
@@ -336,4 +336,11 @@ public class UnstructuredStorageWriterUtil {
taskPluginCollector
.
collectDirtyRecord
(
record
,
e
);
taskPluginCollector
.
collectDirtyRecord
(
record
,
e
);
}
}
}
}
private
static
String
escape
(
String
var
)
{
return
var
.
replaceAll
(
"\n"
,
"\\n"
)
.
replaceAll
(
"\r"
,
"\\r"
)
.
replaceAll
(
"\t"
,
"\\t"
);
}
}
}
pom.xml
View file @
5ff6550d
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<!-- <module>odpswriter</module>-->
<!-- <module>odpswriter</module>-->
<module>
txtfilewriter
</module>
<module>
txtfilewriter
</module>
<!-- <module>ftpwriter</module>-->
<!-- <module>ftpwriter</module>-->
<!-- <module>hdfswriter</module>--
>
<module>
hdfswriter
</module
>
<!-- <module>streamwriter</module>-->
<!-- <module>streamwriter</module>-->
<!-- <module>otswriter</module>-->
<!-- <module>otswriter</module>-->
<!-- <module>oraclewriter</module>-->
<!-- <module>oraclewriter</module>-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment