DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Note: I suggest to follow the second approach
...
(3) branching (use master)
As this is a new repository we don't need to follow the Hadoop "trunk" historical naming convention. We can go with the master which makes it easier to use it from external tools.
What should I do?
After the repository split you should use the new apache/hadoop-ozone repository.
| Code Block |
|---|
git remote add new git@github.com:apache/hadoop-ozone.git
git fetch new |
And you can start to use the master
| Code Block |
|---|
git checkout -b master new/master |
To create pull requests, you should fork the new hadoop-ozone repository.
How can I migrate my work?
(1) cherry-pick always works even if the source and destination branches have different history. Just add the old and new remote to the same repository and cherry-pick between the branches.
| Code Block |
|---|
git checkout -b mywork new/master
git cherry-pick <original commit id> |
(2) all of the open pull requests are migrated as a branch
This approach doesn't require to have both the old and new remotes. Just use your (migrated) branch and continue the work
| Code Block |
|---|
# delete your branch if you have it
git branch -D HDDS-1234
#recreate it from the migrated branch
git checkout -b HDDS-1234 new/HDDS-1234
#Push it to your fork and create a new pull request.
git push elek HDDS-1234 |
Please open a new pull request based on your new branches. If you had comments in the existing pull request, please add a link back to the original one.
(3) Rebase your branch
Similar to the cherry-pick you can use advanced rebase commands to migrate branches between different source trees:
| Code Block |
|---|
git rebase HEAD~3 --onto new/master HDDS-2073 |
This command migrates my local branch (HDDS-2073) to the top of new/master, but only my last three commits (HEAD~3). With this approach multiple (in this case 3) commits can be migrated in one step.
(4) convert your history
It's almost sure that you don't need it, but technically you can transform your own repository. This is the exact transformation which will be applied to the hadoop source tree (It's about 1-2 hours)
| Code Block |
|---|
echo 4e61bc431e297d93c93ede7b42be25259f3ca835 > .git/info/grafts
git filter-branch -f --tree-filter "ls -1 | egrep -v 'hadoop-ozone|hadoop-cblock|hadoop-hdds|hadoop-hdsl|pom.ozone.xml' | xargs -n1 rm -rf" --prune-empty -- --all |
The first command makes the transformation faster: It lies that the 4e61bc commit (the first commit in our new history) doesn't have any parent. (we don't need to scan the whole hadoop history)
The second command applies the filter to all the commits of all the branches (-all). The filter deletes all the files/directories which are not matched (not hadoop-ozone and not hadoop-hdds,...). Commits which are empty after the transformation (eg. YARN only commits) will be removed (–prune empty).
This transformation always gives you the same result (in git everything is based on hash and it doesn't modify any metadata). If you have local, internal fork in your company, it will transform it to a branch which is compatible with the hadoop-ozone.